Added user feedback for exporting

This commit is contained in:
2025-07-07 23:01:16 +02:00
parent e8210babe6
commit c8d0c56ddf

View File

@@ -198,9 +198,29 @@ class _ActiveGameViewState extends State<ActiveGameView> {
),
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),
),
],
),
);
}
}),
],
)