|
|
@ -133,7 +133,7 @@ class MyApp extends StatelessWidget {
|
|
|
|
routes: [
|
|
|
|
routes: [
|
|
|
|
GoRoute(
|
|
|
|
GoRoute(
|
|
|
|
path: 'play',
|
|
|
|
path: 'play',
|
|
|
|
pageBuilder: (context, state) => buildMyTransition(
|
|
|
|
pageBuilder: (context, state) => buildMyTransition<void>(
|
|
|
|
child: const LevelSelectionScreen(
|
|
|
|
child: const LevelSelectionScreen(
|
|
|
|
key: Key('level selection')),
|
|
|
|
key: Key('level selection')),
|
|
|
|
color: context.watch<Palette>().backgroundLevelSelection,
|
|
|
|
color: context.watch<Palette>().backgroundLevelSelection,
|
|
|
@ -145,7 +145,7 @@ class MyApp extends StatelessWidget {
|
|
|
|
final levelNumber = int.parse(state.params['level']!);
|
|
|
|
final levelNumber = int.parse(state.params['level']!);
|
|
|
|
final level = gameLevels
|
|
|
|
final level = gameLevels
|
|
|
|
.singleWhere((e) => e.number == levelNumber);
|
|
|
|
.singleWhere((e) => e.number == levelNumber);
|
|
|
|
return buildMyTransition(
|
|
|
|
return buildMyTransition<void>(
|
|
|
|
child: PlaySessionScreen(
|
|
|
|
child: PlaySessionScreen(
|
|
|
|
level,
|
|
|
|
level,
|
|
|
|
key: const Key('play session'),
|
|
|
|
key: const Key('play session'),
|
|
|
@ -160,7 +160,7 @@ class MyApp extends StatelessWidget {
|
|
|
|
final map = state.extra! as Map<String, dynamic>;
|
|
|
|
final map = state.extra! as Map<String, dynamic>;
|
|
|
|
final score = map['score'] as Score;
|
|
|
|
final score = map['score'] as Score;
|
|
|
|
|
|
|
|
|
|
|
|
return buildMyTransition(
|
|
|
|
return buildMyTransition<void>(
|
|
|
|
child: WinGameScreen(
|
|
|
|
child: WinGameScreen(
|
|
|
|
score: score,
|
|
|
|
score: score,
|
|
|
|
key: const Key('win game'),
|
|
|
|
key: const Key('win game'),
|
|
|
|