2020-01-15 19:04:40 +01:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:flutter/services.dart';
|
|
|
|
|
|
|
|
|
|
import '../localizations.dart';
|
2020-01-25 20:16:19 +01:00
|
|
|
import '../widgets/get_coins.dart';
|
2020-01-15 19:04:40 +01:00
|
|
|
import '../widgets/menu.dart';
|
|
|
|
|
import '../widgets/menu_entry.dart';
|
|
|
|
|
|
|
|
|
|
import 'game.dart';
|
|
|
|
|
import 'intro.dart';
|
|
|
|
|
import 'records.dart';
|
|
|
|
|
|
|
|
|
|
class HomeScreen extends StatelessWidget {
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
final localizations = ChristmasCatsLocalizations.of(context);
|
|
|
|
|
|
|
|
|
|
return Scaffold(
|
|
|
|
|
resizeToAvoidBottomInset: false,
|
|
|
|
|
body: Menu(
|
|
|
|
|
title: localizations.title,
|
|
|
|
|
subtitle: localizations.dedication,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
MenuEntry(
|
|
|
|
|
text: localizations.play,
|
|
|
|
|
onTap: () => Navigator.push(
|
2020-01-19 13:39:23 +01:00
|
|
|
context,
|
|
|
|
|
MaterialPageRoute(
|
|
|
|
|
builder: (context) => GameScreen(),
|
|
|
|
|
),
|
|
|
|
|
),
|
2020-01-15 19:04:40 +01:00
|
|
|
),
|
|
|
|
|
MenuEntry(
|
|
|
|
|
text: localizations.records,
|
|
|
|
|
onTap: () => Navigator.push(
|
2020-01-19 13:39:23 +01:00
|
|
|
context,
|
|
|
|
|
MaterialPageRoute(
|
|
|
|
|
builder: (context) => RecordsScreen(),
|
|
|
|
|
),
|
|
|
|
|
),
|
2020-01-15 19:04:40 +01:00
|
|
|
),
|
|
|
|
|
MenuEntry(
|
|
|
|
|
text: localizations.intro,
|
|
|
|
|
onTap: () => Navigator.push(
|
2020-01-19 13:39:23 +01:00
|
|
|
context,
|
|
|
|
|
MaterialPageRoute(
|
|
|
|
|
builder: (context) => IntroScreen(),
|
|
|
|
|
),
|
|
|
|
|
),
|
2020-01-15 19:04:40 +01:00
|
|
|
),
|
2020-01-25 20:16:19 +01:00
|
|
|
GetCoins(),
|
2020-01-15 19:04:40 +01:00
|
|
|
MenuEntry(
|
|
|
|
|
text: localizations.exit,
|
|
|
|
|
onTap: () => SystemNavigator.pop(),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|