diff --git a/lib/views/active_game_view.dart b/lib/views/active_game_view.dart index 2ae9665..68dfeeb 100644 --- a/lib/views/active_game_view.dart +++ b/lib/views/active_game_view.dart @@ -198,9 +198,29 @@ class _ActiveGameViewState extends State { ), backgroundColorActivated: CustomTheme.backgroundColor, - onTap: () { - LocalStorageService.exportSingleGameSession( - widget.gameSession); + onTap: () async { + final success = await LocalStorageService + .exportSingleGameSession( + widget.gameSession); + if (!success && context.mounted) { + showCupertinoDialog( + context: context, + builder: (context) => CupertinoAlertDialog( + title: Text(AppLocalizations.of(context) + .export_error_title), + content: Text(AppLocalizations.of(context) + .export_error_message), + actions: [ + CupertinoDialogAction( + child: Text( + AppLocalizations.of(context).ok), + onPressed: () => + Navigator.pop(context), + ), + ], + ), + ); + } }), ], )