[mob][photos] exception handlign works in isolate

This commit is contained in:
laurenspriem
2024-09-02 12:45:08 +02:00
parent dcac233296
commit ba083fff70

View File

@@ -62,8 +62,17 @@ class MLUserDeveloperOptions extends StatelessWidget {
buttonType: ButtonType.neutral,
labelText: "Log something in isolate",
onTap: () async {
final boolean = await MLComputer.instance.testLogging();
showShortToast(context, "Done: $boolean");
try {
final boolean =
await MLComputer.instance.testLogging();
showShortToast(context, "Done: $boolean");
} catch (e) {
// ignore: unawaited_futures
showGenericErrorDialog(
context: context,
error: e,
);
}
},
),
const SafeArea(