5 Commits

Author SHA1 Message Date
1a20d7b64c Merge branch 'development' into enhancement/70-konsistenzfehler-im-json-vermeiden
All checks were successful
Pull Request Pipeline / test (pull_request) Successful in 2m24s
Pull Request Pipeline / lint (pull_request) Successful in 2m27s
2026-01-03 14:39:40 +00:00
42cef337aa Merge pull request 'ChooseViews Speichern nicht bei Zurück gehen' (#127) from bug/126-ChooseViews-Speichern-nicht-bei-Zurück-gehen into development
Reviewed-on: #127
Reviewed-by: Felix Kirchner <felix.kirchner.fk@gmail.com>
2026-01-03 12:53:51 +00:00
5289660327 add comment
All checks were successful
Pull Request Pipeline / test (pull_request) Successful in 2m5s
Pull Request Pipeline / lint (pull_request) Successful in 2m8s
2026-01-03 11:02:43 +01:00
16e1f542f5 fix choose rulset & choose group view not saving 2026-01-03 11:02:38 +01:00
e4ae526d93 fix choose_game_view not saving
All checks were successful
Pull Request Pipeline / test (pull_request) Successful in 2m3s
Pull Request Pipeline / lint (pull_request) Successful in 2m5s
2026-01-03 10:16:28 +01:00
3 changed files with 143 additions and 100 deletions

View File

@@ -47,7 +47,17 @@ class _ChooseGameViewState extends State<ChooseGameView> {
), ),
centerTitle: true, centerTitle: true,
), ),
body: Column( body: PopScope(
// This fixes that the Android Back Gesture didn't return the
// selectedGameIndex and therefore the selected Game wasn't saved
canPop: false,
onPopInvokedWithResult: (bool didPop, Object? result) {
if (didPop) {
return;
}
Navigator.of(context).pop(selectedGameIndex);
},
child: Column(
children: [ children: [
Padding( Padding(
padding: const EdgeInsets.symmetric(horizontal: 10), padding: const EdgeInsets.symmetric(horizontal: 10),
@@ -81,6 +91,7 @@ class _ChooseGameViewState extends State<ChooseGameView> {
), ),
], ],
), ),
),
); );
} }
} }

View File

@@ -57,7 +57,23 @@ class _ChooseGroupViewState extends State<ChooseGroupView> {
), ),
centerTitle: true, centerTitle: true,
), ),
body: Column( body: PopScope(
// This fixes that the Android Back Gesture didn't return the
// selectedGroupId and therefore the selected Group wasn't saved
canPop: false,
onPopInvokedWithResult: (bool didPop, Object? result) {
if (didPop) {
return;
}
Navigator.of(context).pop(
selectedGroupId == ''
? null
: widget.groups.firstWhere(
(group) => group.id == selectedGroupId,
),
);
},
child: Column(
children: [ children: [
Padding( Padding(
padding: const EdgeInsets.symmetric(horizontal: 10), padding: const EdgeInsets.symmetric(horizontal: 10),
@@ -113,6 +129,7 @@ class _ChooseGroupViewState extends State<ChooseGroupView> {
), ),
], ],
), ),
),
); );
} }

View File

@@ -52,7 +52,21 @@ class _ChooseRulesetViewState extends State<ChooseRulesetView> {
), ),
centerTitle: true, centerTitle: true,
), ),
body: ListView.builder( body: PopScope(
// This fixes that the Android Back Gesture didn't return the
// selectedRulesetIndex and therefore the selected Ruleset wasn't saved
canPop: false,
onPopInvokedWithResult: (bool didPop, Object? result) {
if (didPop) {
return;
}
Navigator.of(context).pop(
selectedRulesetIndex == -1
? null
: widget.rulesets[selectedRulesetIndex].$1,
);
},
child: ListView.builder(
padding: const EdgeInsets.only(bottom: 85), padding: const EdgeInsets.only(bottom: 85),
itemCount: widget.rulesets.length, itemCount: widget.rulesets.length,
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
@@ -73,6 +87,7 @@ class _ChooseRulesetViewState extends State<ChooseRulesetView> {
}, },
), ),
), ),
),
); );
} }
} }