|
|
@ -1,5 +1,7 @@
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:pinball/game/game.dart';
|
|
|
|
import 'package:pinball/game/game.dart';
|
|
|
|
|
|
|
|
import 'package:pinball/l10n/l10n.dart';
|
|
|
|
|
|
|
|
import 'package:pinball/leaderboard/leader_board.dart';
|
|
|
|
|
|
|
|
|
|
|
|
/// {@template game_over_dialog}
|
|
|
|
/// {@template game_over_dialog}
|
|
|
|
/// [Dialog] displayed when the [PinballGame] is over.
|
|
|
|
/// [Dialog] displayed when the [PinballGame] is over.
|
|
|
@ -10,12 +12,25 @@ class GameOverDialog extends StatelessWidget {
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return const Dialog(
|
|
|
|
final l10n = context.l10n;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return Dialog(
|
|
|
|
child: SizedBox(
|
|
|
|
child: SizedBox(
|
|
|
|
width: 200,
|
|
|
|
width: 200,
|
|
|
|
height: 200,
|
|
|
|
height: 200,
|
|
|
|
child: Center(
|
|
|
|
child: Center(
|
|
|
|
child: Text('Game Over'),
|
|
|
|
child: Column(
|
|
|
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
Text(l10n.gameOver),
|
|
|
|
|
|
|
|
TextButton(
|
|
|
|
|
|
|
|
onPressed: () => Navigator.of(context).push<void>(
|
|
|
|
|
|
|
|
LeaderBoardPage.route(),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
child: Text(l10n.leadersBoard),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|