fix file view nav
This commit is contained in:
@@ -3,6 +3,7 @@ import 'dart:convert';
|
|||||||
|
|
||||||
import 'package:fl_downloader/fl_downloader.dart';
|
import 'package:fl_downloader/fl_downloader.dart';
|
||||||
import 'package:flutter_speed_dial/flutter_speed_dial.dart';
|
import 'package:flutter_speed_dial/flutter_speed_dial.dart';
|
||||||
|
import 'package:go_router/go_router.dart';
|
||||||
import 'package:mzansi_innovation_hub/main.dart';
|
import 'package:mzansi_innovation_hub/main.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.dart';
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
|
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
|
||||||
@@ -103,22 +104,22 @@ class _BuildFilesListState extends State<BuildFilesList> {
|
|||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
if (response2.statusCode == 200) {
|
if (response2.statusCode == 200) {
|
||||||
Navigator.of(context).pop(); //Remove Loading Dialog
|
context.pop(); //Remove Loading Dialog
|
||||||
Navigator.of(context).pop(); //Remove Delete Dialog
|
context.pop(); //Remove Delete Dialog
|
||||||
Navigator.of(context).pop(); //Remove File View Dialog
|
context.pop(); //Remove File View Dialog
|
||||||
Navigator.of(context).pop(); //Remove File List Dialog
|
Navigator.of(context).pop(); //Remove File List Dialog
|
||||||
//print(widget.business);
|
//print(widget.business);
|
||||||
if (widget.business == null) {
|
if (widget.business == null) {
|
||||||
Navigator.of(context).pushNamed('/patient-manager/patient',
|
context.pushNamed('patientManagerPatient',
|
||||||
arguments: PatientViewArguments(
|
extra: PatientViewArguments(
|
||||||
widget.signedInUser,
|
widget.signedInUser,
|
||||||
widget.selectedPatient,
|
widget.selectedPatient,
|
||||||
widget.businessUser,
|
widget.businessUser,
|
||||||
widget.business,
|
widget.business,
|
||||||
"personal"));
|
"personal"));
|
||||||
} else {
|
} else {
|
||||||
Navigator.of(context).pushNamed('/patient-manager/patient',
|
context.pushNamed('patientManagerPatient',
|
||||||
arguments: PatientViewArguments(
|
extra: PatientViewArguments(
|
||||||
widget.signedInUser,
|
widget.signedInUser,
|
||||||
widget.selectedPatient,
|
widget.selectedPatient,
|
||||||
widget.businessUser,
|
widget.businessUser,
|
||||||
@@ -175,9 +176,10 @@ class _BuildFilesListState extends State<BuildFilesList> {
|
|||||||
void printDocument(String link, String path) async {
|
void printDocument(String link, String path) async {
|
||||||
http2.Response response = await http.get(Uri.parse(link));
|
http2.Response response = await http.get(Uri.parse(link));
|
||||||
var pdfData = response.bodyBytes;
|
var pdfData = response.bodyBytes;
|
||||||
Navigator.of(context).pushNamed(
|
context.pop();
|
||||||
'/file-veiwer/print-preview',
|
context.pushNamed(
|
||||||
arguments: PrintPreviewArguments(
|
'printPreview',
|
||||||
|
extra: PrintPreviewArguments(
|
||||||
pdfData,
|
pdfData,
|
||||||
getFileName(path),
|
getFileName(path),
|
||||||
),
|
),
|
||||||
@@ -274,9 +276,10 @@ class _BuildFilesListState extends State<BuildFilesList> {
|
|||||||
backgroundColor: MihColors.getGreenColor(
|
backgroundColor: MihColors.getGreenColor(
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.of(context).pushNamed(
|
context.pop();
|
||||||
'/file-veiwer',
|
context.pushNamed(
|
||||||
arguments: FileViewArguments(
|
'fileViewer',
|
||||||
|
extra: FileViewArguments(
|
||||||
url,
|
url,
|
||||||
filePath,
|
filePath,
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user