Added user feedback for exporting
This commit is contained in:
@@ -198,9 +198,29 @@ class _ActiveGameViewState extends State<ActiveGameView> {
|
|||||||
),
|
),
|
||||||
backgroundColorActivated:
|
backgroundColorActivated:
|
||||||
CustomTheme.backgroundColor,
|
CustomTheme.backgroundColor,
|
||||||
onTap: () {
|
onTap: () async {
|
||||||
LocalStorageService.exportSingleGameSession(
|
final success = await LocalStorageService
|
||||||
|
.exportSingleGameSession(
|
||||||
widget.gameSession);
|
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),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user