fix claims view print and delete
This commit is contained in:
@@ -2,6 +2,7 @@ import 'dart:async';
|
||||
|
||||
import 'package:fl_downloader/fl_downloader.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/mih_components/mih_package_components/mih_icons.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
|
||||
@@ -125,13 +126,21 @@ class _BuildClaimStatementFileListState
|
||||
void printDocument(String link, String path) async {
|
||||
http2.Response response = await http.get(Uri.parse(link));
|
||||
var pdfData = response.bodyBytes;
|
||||
Navigator.of(context).pushNamed(
|
||||
'/file-veiwer/print-preview',
|
||||
arguments: PrintPreviewArguments(
|
||||
context.pop();
|
||||
context.pushNamed(
|
||||
'printPreview',
|
||||
extra: PrintPreviewArguments(
|
||||
pdfData,
|
||||
getFileName(path),
|
||||
),
|
||||
);
|
||||
// Navigator.of(context).pushNamed(
|
||||
// '/file-veiwer/print-preview',
|
||||
// arguments: PrintPreviewArguments(
|
||||
// pdfData,
|
||||
// getFileName(path),
|
||||
// ),
|
||||
// );
|
||||
}
|
||||
|
||||
void nativeFileDownload(String fileLink) async {
|
||||
@@ -222,7 +231,15 @@ class _BuildClaimStatementFileListState
|
||||
backgroundColor: MihColors.getGreenColor(
|
||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||
onTap: () {
|
||||
printDocument(url, filePath);
|
||||
context.pop();
|
||||
context.pushNamed(
|
||||
'fileViewer',
|
||||
extra: FileViewArguments(
|
||||
url,
|
||||
filePath,
|
||||
),
|
||||
);
|
||||
// printDocument(url, filePath);
|
||||
},
|
||||
),
|
||||
);
|
||||
|
||||
@@ -107,7 +107,7 @@ class _BuildFilesListState extends State<BuildFilesList> {
|
||||
context.pop(); //Remove Loading Dialog
|
||||
context.pop(); //Remove Delete Dialog
|
||||
context.pop(); //Remove File View Dialog
|
||||
Navigator.of(context).pop(); //Remove File List Dialog
|
||||
context.pop(); //Remove File List Dialog
|
||||
//print(widget.business);
|
||||
if (widget.business == null) {
|
||||
context.pushNamed('patientManagerPatient',
|
||||
|
||||
Reference in New Issue
Block a user