fix: match view state issue

This commit is contained in:
2026-05-21 00:09:51 +02:00
parent e61af14827
commit 0c40357847
2 changed files with 10 additions and 4 deletions

View File

@@ -300,7 +300,10 @@ class _CreateMatchViewState extends State<CreateMatchView> {
context, context,
adaptivePageRoute( adaptivePageRoute(
fullscreenDialog: !isTeamMatch, fullscreenDialog: !isTeamMatch,
builder: (context) => CreateTeamsView(match: match), builder: (context) => CreateTeamsView(
match: match,
onWinnerChanged: widget.onWinnerChanged,
),
), ),
); );
} }

View File

@@ -16,9 +16,10 @@ import 'package:tallee/presentation/widgets/buttons/main_menu_button.dart';
import 'package:tallee/presentation/widgets/tiles/team_creation_tile.dart'; import 'package:tallee/presentation/widgets/tiles/team_creation_tile.dart';
class CreateTeamsView extends StatefulWidget { class CreateTeamsView extends StatefulWidget {
const CreateTeamsView({super.key, required this.match}); const CreateTeamsView({super.key, required this.match, this.onWinnerChanged});
final Match match; final Match match;
final VoidCallback? onWinnerChanged;
@override @override
State<CreateTeamsView> createState() => _CreateTeamsViewState(); State<CreateTeamsView> createState() => _CreateTeamsViewState();
@@ -140,8 +141,10 @@ class _CreateTeamsViewState extends State<CreateTeamsView> {
context, context,
adaptivePageRoute( adaptivePageRoute(
fullscreenDialog: true, fullscreenDialog: true,
builder: (context) => builder: (context) => MatchResultView(
MatchResultView(match: match), match: match,
onWinnerChanged: widget.onWinnerChanged,
),
), ),
(route) => route.isFirst, (route) => route.isFirst,
); );