feat: used l10n string for "Play"

pull/2/head
alestiago 4 years ago
parent ad16d8a256
commit 1c349a014e

@ -1,7 +1,4 @@
{ {
"@@locale": "en", "@@locale": "en",
"counterAppBarTitle": "Counter", "play": "Play"
"@counterAppBarTitle": {
"description": "Text shown in the AppBar of the Counter Page"
}
} }

@ -1,7 +1,4 @@
{ {
"@@locale": "es", "@@locale": "es",
"counterAppBarTitle": "Contador", "play": "Jugar"
"@counterAppBarTitle": {
"description": "Texto mostrado en la AppBar de la página del contador"
}
} }

@ -1,17 +1,19 @@
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';
class LandingPage extends StatelessWidget { class LandingPage extends StatelessWidget {
const LandingPage({Key? key}) : super(key: key); const LandingPage({Key? key}) : super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final l10n = context.l10n;
return Scaffold( return Scaffold(
body: Center( body: Center(
child: TextButton( child: TextButton(
onPressed: () => onPressed: () =>
Navigator.of(context).push<void>(PinballGamePage.route()), Navigator.of(context).push<void>(PinballGamePage.route()),
child: const Text('Start'), child: Text(l10n.play),
), ),
), ),
); );

Loading…
Cancel
Save