fix: match view state issue
This commit is contained in:
@@ -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,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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,
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user