From 1c349a014e9bef21d5ecda155407b888c0e4758d Mon Sep 17 00:00:00 2001 From: alestiago Date: Mon, 28 Feb 2022 16:45:16 +0000 Subject: [PATCH] feat: used l10n string for "Play" --- lib/l10n/arb/app_en.arb | 5 +---- lib/l10n/arb/app_es.arb | 5 +---- lib/landing/view/landing_page.dart | 4 +++- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/lib/l10n/arb/app_en.arb b/lib/l10n/arb/app_en.arb index a5484a06..fa732ac7 100644 --- a/lib/l10n/arb/app_en.arb +++ b/lib/l10n/arb/app_en.arb @@ -1,7 +1,4 @@ { "@@locale": "en", - "counterAppBarTitle": "Counter", - "@counterAppBarTitle": { - "description": "Text shown in the AppBar of the Counter Page" - } + "play": "Play" } \ No newline at end of file diff --git a/lib/l10n/arb/app_es.arb b/lib/l10n/arb/app_es.arb index f1405f02..405ef51f 100644 --- a/lib/l10n/arb/app_es.arb +++ b/lib/l10n/arb/app_es.arb @@ -1,7 +1,4 @@ { "@@locale": "es", - "counterAppBarTitle": "Contador", - "@counterAppBarTitle": { - "description": "Texto mostrado en la AppBar de la página del contador" - } + "play": "Jugar" } \ No newline at end of file diff --git a/lib/landing/view/landing_page.dart b/lib/landing/view/landing_page.dart index 1e505e16..a688dee1 100644 --- a/lib/landing/view/landing_page.dart +++ b/lib/landing/view/landing_page.dart @@ -1,17 +1,19 @@ import 'package:flutter/material.dart'; import 'package:pinball/game/game.dart'; +import 'package:pinball/l10n/l10n.dart'; class LandingPage extends StatelessWidget { const LandingPage({Key? key}) : super(key: key); @override Widget build(BuildContext context) { + final l10n = context.l10n; return Scaffold( body: Center( child: TextButton( onPressed: () => Navigator.of(context).push(PinballGamePage.route()), - child: const Text('Start'), + child: Text(l10n.play), ), ), );