Implementing single game export
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import 'package:cabo_counter/data/game_manager.dart';
|
||||
import 'package:cabo_counter/data/game_session.dart';
|
||||
import 'package:cabo_counter/l10n/app_localizations.dart';
|
||||
import 'package:cabo_counter/services/local_storage_service.dart';
|
||||
import 'package:cabo_counter/utility/custom_theme.dart';
|
||||
import 'package:cabo_counter/views/create_game_view.dart';
|
||||
import 'package:cabo_counter/views/graph_view.dart';
|
||||
@@ -192,14 +193,15 @@ class _ActiveGameViewState extends State<ActiveGameView> {
|
||||
},
|
||||
),
|
||||
CupertinoListTile(
|
||||
title:
|
||||
Text(AppLocalizations.of(context).export_game,
|
||||
style: const TextStyle(
|
||||
color: Colors.white30,
|
||||
)),
|
||||
backgroundColorActivated:
|
||||
CustomTheme.backgroundColor,
|
||||
),
|
||||
title: Text(
|
||||
AppLocalizations.of(context).export_game,
|
||||
),
|
||||
backgroundColorActivated:
|
||||
CustomTheme.backgroundColor,
|
||||
onTap: () {
|
||||
LocalStorageService.exportSingleGameSession(
|
||||
widget.gameSession);
|
||||
}),
|
||||
],
|
||||
)
|
||||
],
|
||||
|
||||
@@ -140,7 +140,7 @@ class _SettingsViewState extends State<SettingsView> {
|
||||
),
|
||||
onPressed: () async {
|
||||
final success =
|
||||
await LocalStorageService.exportJsonFile();
|
||||
await LocalStorageService.exportGameData();
|
||||
if (!success && context.mounted) {
|
||||
showCupertinoDialog(
|
||||
context: context,
|
||||
|
||||
Reference in New Issue
Block a user