pickFileAndReadReport method
Future<void>
pickFileAndReadReport(
{ - String? pathOverride,
- bool readSync = false,
- bool clear = true,
})
Implementation
Future<void> pickFileAndReadReport({String? pathOverride, bool readSync = false, bool clear = true}) async {
String path;
if (pathOverride == null) {
final result = await FilePicker.platform.pickFiles(allowMultiple: false);
if (result == null) return;
path = result.paths.single!;
} else {
path = pathOverride;
}
GetIt.I.get<HomePageStore>().displayLoadedReportMode = true;
await readReportFromFile(path, sync: readSync, doClear: clear);
}