Merge remote-tracking branch 'origin/development' into enhancement/128-PageRoutes-adaptable-machen

# Conflicts:
#	lib/presentation/views/main_menu/match_view/create_match/create_match_view.dart
This commit is contained in:
2026-01-10 14:57:33 +01:00
3 changed files with 286 additions and 279 deletions

View File

@@ -44,7 +44,8 @@ class _CreateGroupViewState extends State<CreateGroupView> {
@override
Widget build(BuildContext context) {
final loc = AppLocalizations.of(context);
return Scaffold(
return ScaffoldMessenger(
child: Scaffold(
backgroundColor: CustomTheme.backgroundColor,
appBar: AppBar(title: Text(loc.create_new_group)),
body: SafeArea(
@@ -106,6 +107,7 @@ class _CreateGroupViewState extends State<CreateGroupView> {
],
),
),
),
);
}
}

View File

@@ -1,3 +1,4 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:game_tracker/core/adaptive_page_route.dart';
import 'package:game_tracker/core/custom_theme.dart';
@@ -119,7 +120,8 @@ class _CreateMatchViewState extends State<CreateMatchView> {
@override
Widget build(BuildContext context) {
final loc = AppLocalizations.of(context);
return Scaffold(
return ScaffoldMessenger(
child: Scaffold(
backgroundColor: CustomTheme.backgroundColor,
appBar: AppBar(title: Text(loc.create_new_match)),
body: SafeArea(
@@ -140,7 +142,7 @@ class _CreateMatchViewState extends State<CreateMatchView> {
: games[selectedGameIndex].$1,
onPressed: () async {
selectedGameIndex = await Navigator.of(context).push(
adaptivePageRoute(
MaterialPageRoute(
builder: (context) => ChooseGameView(
games: games,
initialGameIndex: selectedGameIndex,
@@ -168,7 +170,7 @@ class _CreateMatchViewState extends State<CreateMatchView> {
: translateRulesetToString(selectedRuleset!, context),
onPressed: () async {
selectedRuleset = await Navigator.of(context).push(
adaptivePageRoute(
MaterialPageRoute(
builder: (context) => ChooseRulesetView(
rulesets: _rulesets,
initialRulesetIndex: selectedRulesetIndex,
@@ -190,7 +192,7 @@ class _CreateMatchViewState extends State<CreateMatchView> {
: selectedGroup!.name,
onPressed: () async {
selectedGroup = await Navigator.of(context).push(
adaptivePageRoute(
MaterialPageRoute(
builder: (context) => ChooseGroupView(
groups: groupsList,
initialGroupId: selectedGroupId,
@@ -240,7 +242,7 @@ class _CreateMatchViewState extends State<CreateMatchView> {
if (context.mounted) {
Navigator.pushReplacement(
context,
adaptivePageRoute(
CupertinoPageRoute(
fullscreenDialog: true,
builder: (context) => MatchResultView(
match: match,
@@ -255,6 +257,7 @@ class _CreateMatchViewState extends State<CreateMatchView> {
],
),
),
),
);
}

View File

@@ -21,7 +21,8 @@ class _SettingsViewState extends State<SettingsView> {
@override
Widget build(BuildContext context) {
final loc = AppLocalizations.of(context);
return Scaffold(
return ScaffoldMessenger(
child: Scaffold(
appBar: AppBar(backgroundColor: CustomTheme.backgroundColor),
backgroundColor: CustomTheme.backgroundColor,
body: LayoutBuilder(
@@ -121,6 +122,7 @@ class _SettingsViewState extends State<SettingsView> {
),
),
),
),
);
}