Преглед на файлове

sprint 3 carlos integrado

Oniel Mendez преди 4 години
родител
ревизия
8ee4aed109

+ 17
- 0
fast_med_flutter/lib/classes/language.dart Целия файл

@@ -0,0 +1,17 @@
1
+class Language {
2
+  final int id;
3
+  final String flag;
4
+  final String name;
5
+  final String languageCode;
6
+
7
+  Language(this.id, this.flag, this.name, this.languageCode);
8
+
9
+  static List<Language> languageList() {
10
+    return <Language>[
11
+      Language(1, "🇦🇫", "فارسی", "fa"),
12
+      Language(2, "🇺🇸", "English", "en"),
13
+      Language(3, "🇺🇸", "Español", "es"),
14
+      Language(4, "🇮🇳", "हिंदी", "hi"),
15
+    ];
16
+  }
17
+}

+ 15
- 0
fast_med_flutter/lib/languages/en.json Целия файл

@@ -0,0 +1,15 @@
1
+{
2
+  "home_page": "Home Page",
3
+  "personal_information": "Personal Information",
4
+  "name": "Name",
5
+  "name_hint": "Enter your name",
6
+  "email": "Email",
7
+  "email_hint": "Enter your email",
8
+  "date_of_birth": "Date of Birth",
9
+  "required_field": "Required Field",
10
+  "submit_info": "Submit Info",
11
+  "about_us": "About Us",
12
+  "settings": "Settings",
13
+  "change_language": "Change Language",
14
+  "about": "This user story translate for our FastMed app in CCOM4030."
15
+}

+ 15
- 0
fast_med_flutter/lib/languages/es.json Целия файл

@@ -0,0 +1,15 @@
1
+{
2
+  "home_page": "Pagina Inicio",
3
+  "personal_information": "Informacion Personal",
4
+  "name": "Nombre",
5
+  "name_hint": "Entra tu nombre",
6
+  "email": "Correo electronico",
7
+  "email_hint": "Entra tu correo electronico",
8
+  "date_of_birth": "Fecha de nacimiento",
9
+  "required_field": "Campo requerido",
10
+  "submit_info": "Somete informacion",
11
+  "about_us": "Acerca de nosotros",
12
+  "settings": "Configuracion",
13
+  "change_language": "Cambia el lenguaje",
14
+  "about": "Este user story traduce para nuestro FastMed app en CCOM4030."
15
+}

+ 42
- 0
fast_med_flutter/lib/localization/language_constants.dart Целия файл

@@ -0,0 +1,42 @@
1
+import 'package:flutter/material.dart';
2
+import '../localization/localization.dart';
3
+import 'package:shared_preferences/shared_preferences.dart';
4
+
5
+const String LAGUAGE_CODE = 'languageCode';
6
+
7
+//languages code
8
+const String ENGLISH = 'en';
9
+const String FARSI = 'fa';
10
+const String SPANISH = 'es';
11
+const String HINDI = 'hi';
12
+
13
+Future<Locale> setLocale(String languageCode) async {
14
+  SharedPreferences _prefs = await SharedPreferences.getInstance();
15
+  await _prefs.setString(LAGUAGE_CODE, languageCode);
16
+  return _locale(languageCode);
17
+}
18
+
19
+Future<Locale> getLocale() async {
20
+  SharedPreferences _prefs = await SharedPreferences.getInstance();
21
+  String languageCode = _prefs.getString(LAGUAGE_CODE) ?? "en";
22
+  return _locale(languageCode);
23
+}
24
+
25
+Locale _locale(String languageCode) {
26
+  switch (languageCode) {
27
+    case ENGLISH:
28
+      return Locale(ENGLISH, 'US');
29
+    case FARSI:
30
+      return Locale(FARSI, "IR");
31
+    case SPANISH:
32
+      return Locale(SPANISH, "SP");
33
+    case HINDI:
34
+      return Locale(HINDI, "IN");
35
+    default:
36
+      return Locale(ENGLISH, 'US');
37
+  }
38
+}
39
+
40
+String getTranslated(BuildContext context, String key) {
41
+  return DemoLocalization.of(context).translate(key);
42
+}

+ 51
- 0
fast_med_flutter/lib/localization/localization.dart Целия файл

@@ -0,0 +1,51 @@
1
+import 'dart:convert';
2
+
3
+import 'package:flutter/material.dart';
4
+import 'package:flutter/services.dart';
5
+
6
+class DemoLocalization {
7
+  DemoLocalization(this.locale);
8
+
9
+  final Locale locale;
10
+  static DemoLocalization of(BuildContext context) {
11
+    return Localizations.of<DemoLocalization>(context, DemoLocalization);
12
+  }
13
+
14
+  Map<String, String> _localizedValues;
15
+
16
+  Future<void> load() async {
17
+    String jsonStringValues =
18
+    await rootBundle.loadString('lib/languages/${locale.languageCode}.json');
19
+    Map<String, dynamic> mappedJson = json.decode(jsonStringValues);
20
+    _localizedValues =
21
+        mappedJson.map((key, value) => MapEntry(key, value.toString()));
22
+  }
23
+
24
+  String translate(String key) {
25
+    return _localizedValues[key];
26
+  }
27
+
28
+  // static member to have simple access to the delegate from Material App
29
+  static const LocalizationsDelegate<DemoLocalization> delegate =
30
+  _DemoLocalizationsDelegate();
31
+}
32
+
33
+class _DemoLocalizationsDelegate
34
+    extends LocalizationsDelegate<DemoLocalization> {
35
+  const _DemoLocalizationsDelegate();
36
+
37
+  @override
38
+  bool isSupported(Locale locale) {
39
+    return ['en', 'es', 'fa', 'hi'].contains(locale.languageCode);
40
+  }
41
+
42
+  @override
43
+  Future<DemoLocalization> load(Locale locale) async {
44
+    DemoLocalization localization = new DemoLocalization(locale);
45
+    await localization.load();
46
+    return localization;
47
+  }
48
+
49
+  @override
50
+  bool shouldReload(LocalizationsDelegate<DemoLocalization> old) => false;
51
+}

+ 2
- 0
fast_med_flutter/lib/main.dart Целия файл

@@ -8,6 +8,7 @@ import 'package:fast_med_flutter/routes/welcome.dart';
8 8
 import 'package:fast_med_flutter/routes/album.dart';
9 9
 import 'package:flutter/material.dart';
10 10
 import 'package:fast_med_flutter/routes/especialidades.dart';
11
+import 'routes/translation.dart';
11 12
 
12 13
 void main() => runApp(MaterialApp(
13 14
     initialRoute: '/welcome',
@@ -21,6 +22,7 @@ void main() => runApp(MaterialApp(
21 22
       '/MyApp': (context) => MyApp(),
22 23
       '/album': (context) => album(),
23 24
       '/especialidades': (context) => especialidades(),
25
+      '/translation': (context) => translation(),
24 26
 
25 27
     }
26 28
 ));

+ 26
- 0
fast_med_flutter/lib/pages/about_page.dart Целия файл

@@ -0,0 +1,26 @@
1
+import 'package:flutter/material.dart';
2
+import '../localization/language_constants.dart';
3
+
4
+class AboutPage extends StatefulWidget {
5
+  AboutPage({Key key}) : super(key: key);
6
+
7
+  @override
8
+  _AboutPageState createState() => _AboutPageState();
9
+}
10
+
11
+class _AboutPageState extends State<AboutPage> {
12
+  @override
13
+  Widget build(BuildContext context) {
14
+    return Scaffold(
15
+      appBar: AppBar(
16
+        title: Text(getTranslated(context, 'about_us')),
17
+      ),
18
+      body: Container(
19
+        padding: EdgeInsets.all(20),
20
+        child: Center(
21
+          child: Text(getTranslated(context, 'about')),
22
+        ),
23
+      ),
24
+    );
25
+  }
26
+}

+ 217
- 0
fast_med_flutter/lib/pages/home_page.dart Целия файл

@@ -0,0 +1,217 @@
1
+import 'package:flutter/material.dart';
2
+import '../classes/language.dart';
3
+import '../localization/language_constants.dart';
4
+import '../routes/translation.dart';
5
+import '../router/route_constants.dart';
6
+
7
+class HomePage extends StatefulWidget {
8
+  HomePage({Key key}) : super(key: key);
9
+
10
+  @override
11
+  _HomePageState createState() => _HomePageState();
12
+}
13
+
14
+class _HomePageState extends State<HomePage> {
15
+  final GlobalKey<FormState> _key = GlobalKey<FormState>();
16
+  void _changeLanguage(Language language) async {
17
+    Locale _locale = await setLocale(language.languageCode);
18
+    translation.setLocale(context, _locale);
19
+  }
20
+
21
+  void _showSuccessDialog() {
22
+    showTimePicker(context: context, initialTime: TimeOfDay.now());
23
+  }
24
+
25
+  @override
26
+  Widget build(BuildContext context) {
27
+    return Scaffold(
28
+      appBar: AppBar(
29
+        title: Text(getTranslated(context, 'home_page')),
30
+        actions: <Widget>[
31
+          Padding(
32
+            padding: const EdgeInsets.all(8.0),
33
+            child: DropdownButton<Language>(
34
+              underline: SizedBox(),
35
+              icon: Icon(
36
+                Icons.language,
37
+                color: Colors.white,
38
+              ),
39
+              onChanged: (Language language) {
40
+                _changeLanguage(language);
41
+              },
42
+              items: Language.languageList()
43
+                  .map<DropdownMenuItem<Language>>(
44
+                    (e) => DropdownMenuItem<Language>(
45
+                  value: e,
46
+                  child: Row(
47
+                    mainAxisAlignment: MainAxisAlignment.spaceAround,
48
+                    children: <Widget>[
49
+                      Text(
50
+                        e.flag,
51
+                        style: TextStyle(fontSize: 30),
52
+                      ),
53
+                      Text(e.name)
54
+                    ],
55
+                  ),
56
+                ),
57
+              )
58
+                  .toList(),
59
+            ),
60
+          ),
61
+        ],
62
+      ),
63
+      drawer: Drawer(
64
+        child: _drawerList(),
65
+      ),
66
+      body: Container(
67
+        padding: EdgeInsets.all(20),
68
+        child: _mainForm(context),
69
+      ),
70
+    );
71
+  }
72
+
73
+  Form _mainForm(BuildContext context) {
74
+    return Form(
75
+      key: _key,
76
+      child: Column(
77
+        children: <Widget>[
78
+          Container(
79
+            height: MediaQuery.of(context).size.height / 4,
80
+            child: Center(
81
+              child: Text(
82
+                getTranslated(context, 'personal_information'),
83
+                // DemoLocalization.of(context).translate('personal_information'),
84
+                textAlign: TextAlign.center,
85
+                style: TextStyle(
86
+                  fontSize: 30,
87
+                  fontWeight: FontWeight.bold,
88
+                ),
89
+              ),
90
+            ),
91
+          ),
92
+          TextFormField(
93
+            validator: (val) {
94
+              if (val.isEmpty) {
95
+                return getTranslated(context, 'required_field');
96
+                // return DemoLocalization.of(context).translate('required_fiedl');
97
+              }
98
+              return null;
99
+            },
100
+            decoration: InputDecoration(
101
+              border: OutlineInputBorder(),
102
+              labelText: getTranslated(context, 'name'),
103
+              hintText: getTranslated(context, 'name_hint'),
104
+            ),
105
+          ),
106
+          SizedBox(
107
+            height: 10,
108
+          ),
109
+          TextFormField(
110
+            validator: (val) {
111
+              if (val.isEmpty) {
112
+                return getTranslated(context, 'required_field');
113
+              }
114
+              return null;
115
+            },
116
+            decoration: InputDecoration(
117
+              border: OutlineInputBorder(),
118
+              labelText: getTranslated(context, 'email'),
119
+              hintText: getTranslated(context, 'email_hint'),
120
+            ),
121
+          ),
122
+          SizedBox(
123
+            height: 10,
124
+          ),
125
+          TextFormField(
126
+            decoration: InputDecoration(
127
+                border: OutlineInputBorder(),
128
+                hintText: getTranslated(context, 'date_of_birth')),
129
+            onTap: () async {
130
+              FocusScope.of(context).requestFocus(FocusNode());
131
+              await showDatePicker(
132
+                context: context,
133
+                initialDate: DateTime.now(),
134
+                firstDate: DateTime(DateTime.now().year),
135
+                lastDate: DateTime(DateTime.now().year + 20),
136
+              );
137
+            },
138
+          ),
139
+          SizedBox(
140
+            height: 10,
141
+          ),
142
+          MaterialButton(
143
+            onPressed: () {
144
+              if (_key.currentState.validate()) {
145
+                _showSuccessDialog();
146
+              }
147
+            },
148
+            height: 50,
149
+            shape: StadiumBorder(),
150
+            color: Theme.of(context).primaryColor,
151
+            child: Center(
152
+              child: Text(
153
+                getTranslated(context, 'submit_info'),
154
+                style: TextStyle(color: Colors.white, fontSize: 20),
155
+              ),
156
+            ),
157
+          )
158
+        ],
159
+      ),
160
+    );
161
+  }
162
+
163
+  Container _drawerList() {
164
+    TextStyle _textStyle = TextStyle(
165
+      color: Colors.white,
166
+      fontSize: 24,
167
+    );
168
+    return Container(
169
+      color: Theme.of(context).primaryColor,
170
+      child: ListView(
171
+        padding: EdgeInsets.zero,
172
+        children: <Widget>[
173
+          DrawerHeader(
174
+            child: Container(
175
+              height: 100,
176
+              child: CircleAvatar(),
177
+            ),
178
+          ),
179
+          ListTile(
180
+            leading: Icon(
181
+              Icons.info,
182
+              color: Colors.white,
183
+              size: 30,
184
+            ),
185
+            title: Text(
186
+              getTranslated(context, 'about_us'),
187
+              style: _textStyle,
188
+            ),
189
+            onTap: () {
190
+              // To close the Drawer
191
+              Navigator.pop(context);
192
+              // Navigating to About Page
193
+              Navigator.pushNamed(context, aboutRoute);
194
+            },
195
+          ),
196
+          ListTile(
197
+            leading: Icon(
198
+              Icons.settings,
199
+              color: Colors.white,
200
+              size: 30,
201
+            ),
202
+            title: Text(
203
+              getTranslated(context, 'settings'),
204
+              style: _textStyle,
205
+            ),
206
+            onTap: () {
207
+              // To close the Drawer
208
+              Navigator.pop(context);
209
+              // Navigating to About Page
210
+              Navigator.pushNamed(context, settingsRoute);
211
+            },
212
+          ),
213
+        ],
214
+      ),
215
+    );
216
+  }
217
+}

+ 24
- 0
fast_med_flutter/lib/pages/not_found_page.dart Целия файл

@@ -0,0 +1,24 @@
1
+import 'package:flutter/material.dart';
2
+
3
+class NotFoundPage extends StatefulWidget {
4
+  NotFoundPage({Key key}) : super(key: key);
5
+
6
+  @override
7
+  _NotFoundPageState createState() => _NotFoundPageState();
8
+}
9
+
10
+class _NotFoundPageState extends State<NotFoundPage> {
11
+  @override
12
+  Widget build(BuildContext context) {
13
+    return Scaffold(
14
+      appBar: AppBar(
15
+        title: Text("Not Found"),
16
+      ),
17
+      body: Container(
18
+        child: Center(
19
+          child: Text("Sorry, We couldn't found your page"),
20
+        ),
21
+      ),
22
+    );
23
+  }
24
+}

+ 54
- 0
fast_med_flutter/lib/pages/settings_page.dart Целия файл

@@ -0,0 +1,54 @@
1
+import 'package:flutter/material.dart';
2
+import '../classes/language.dart';
3
+import '../localization/language_constants.dart';
4
+import '../routes/translation.dart';
5
+
6
+class SettingsPage extends StatefulWidget {
7
+  SettingsPage({Key key}) : super(key: key);
8
+
9
+  @override
10
+  _SettingsPageState createState() => _SettingsPageState();
11
+}
12
+
13
+class _SettingsPageState extends State<SettingsPage> {
14
+  void _changeLanguage(Language language) async {
15
+    Locale _locale = await setLocale(language.languageCode);
16
+    translation.setLocale(context, _locale);
17
+  }
18
+
19
+  @override
20
+  Widget build(BuildContext context) {
21
+    return Scaffold(
22
+      appBar: AppBar(
23
+        title: Text(getTranslated(context, 'settings')),
24
+      ),
25
+      body: Container(
26
+        child: Center(
27
+            child: DropdownButton<Language>(
28
+              iconSize: 30,
29
+              hint: Text(getTranslated(context, 'change_language')),
30
+              onChanged: (Language language) {
31
+                _changeLanguage(language);
32
+              },
33
+              items: Language.languageList()
34
+                  .map<DropdownMenuItem<Language>>(
35
+                    (e) => DropdownMenuItem<Language>(
36
+                  value: e,
37
+                  child: Row(
38
+                    mainAxisAlignment: MainAxisAlignment.spaceAround,
39
+                    children: <Widget>[
40
+                      Text(
41
+                        e.flag,
42
+                        style: TextStyle(fontSize: 30),
43
+                      ),
44
+                      Text(e.name)
45
+                    ],
46
+                  ),
47
+                ),
48
+              )
49
+                  .toList(),
50
+            )),
51
+      ),
52
+    );
53
+  }
54
+}

+ 21
- 0
fast_med_flutter/lib/router/custom_router.dart Целия файл

@@ -0,0 +1,21 @@
1
+import 'package:flutter/material.dart';
2
+import '../pages/about_page.dart';
3
+import '../pages/home_page.dart';
4
+import '../pages/not_found_page.dart';
5
+import '../pages/settings_page.dart';
6
+import '../router/route_constants.dart';
7
+
8
+class CustomRouter {
9
+  static Route<dynamic> generatedRoute(RouteSettings settings) {
10
+    switch (settings.name) {
11
+      case homeRoute:
12
+        return MaterialPageRoute(builder: (_) => HomePage());
13
+      case aboutRoute:
14
+        return MaterialPageRoute(builder: (_) => AboutPage());
15
+      case settingsRoute:
16
+        return MaterialPageRoute(builder: (_) => SettingsPage());
17
+      default:
18
+        return MaterialPageRoute(builder: (_) => NotFoundPage());
19
+    }
20
+  }
21
+}

+ 3
- 0
fast_med_flutter/lib/router/route_constants.dart Целия файл

@@ -0,0 +1,3 @@
1
+const String homeRoute = "home";
2
+const String aboutRoute = "about";
3
+const String settingsRoute = "settings";

+ 2
- 6
fast_med_flutter/lib/routes/home.dart Целия файл

@@ -25,14 +25,10 @@ class _HomeState extends State<Home>{
25 25
             spaceBetween(),
26 26
             newButton(context,'/calendario','Calendario'),
27 27
             spaceBetween(),
28
-            newButton(context,'/register','Register'),
29
-            spaceBetween(),
30
-            newButton(context,'/welcome','Welcome'),
31
-            spaceBetween(),
32
-            newButton(context,'/MyApp','MyApp'),
33
-            spaceBetween(),
34 28
             newButton(context,'/especialidades','especialidades'),
35 29
             spaceBetween(),
30
+            newButton(context,'/translation','translation'),
31
+            spaceBetween(),
36 32
             ],
37 33
         ),
38 34
 

+ 81
- 0
fast_med_flutter/lib/routes/translation.dart Целия файл

@@ -0,0 +1,81 @@
1
+import 'package:flutter/material.dart';
2
+import '../localization/localization.dart';
3
+import '../router/custom_router.dart';
4
+import '../router/route_constants.dart';
5
+import 'package:flutter_localizations/flutter_localizations.dart';
6
+
7
+import '../localization/language_constants.dart';
8
+
9
+void main() => runApp(translation());
10
+
11
+class translation extends StatefulWidget {
12
+  const translation({Key key}) : super(key: key);
13
+  static void setLocale(BuildContext context, Locale newLocale) {
14
+    _MyAppState state = context.findAncestorStateOfType<_MyAppState>();
15
+    state.setLocale(newLocale);
16
+  }
17
+
18
+  @override
19
+  _MyAppState createState() => _MyAppState();
20
+}
21
+
22
+class _MyAppState extends State<translation> {
23
+  Locale _locale;
24
+  setLocale(Locale locale) {
25
+    setState(() {
26
+      _locale = locale;
27
+    });
28
+  }
29
+
30
+  @override
31
+  void didChangeDependencies() {
32
+    getLocale().then((locale) {
33
+      setState(() {
34
+        this._locale = locale;
35
+      });
36
+    });
37
+    super.didChangeDependencies();
38
+  }
39
+
40
+  @override
41
+  Widget build(BuildContext context) {
42
+    if (this._locale == null) {
43
+      return Container(
44
+        child: Center(
45
+          child: CircularProgressIndicator(
46
+              valueColor: AlwaysStoppedAnimation<Color>(Colors.blue[800])),
47
+        ),
48
+      );
49
+    } else {
50
+      return MaterialApp(
51
+        debugShowCheckedModeBanner: false,
52
+        title: "Flutter Localization Demo",
53
+        theme: ThemeData(primarySwatch: Colors.blue),
54
+        locale: _locale,
55
+        supportedLocales: [
56
+          Locale("en", "US"),
57
+          Locale("fa", "IR"),
58
+          Locale("es", "SP"),
59
+          Locale("hi", "IN")
60
+        ],
61
+        localizationsDelegates: [
62
+          DemoLocalization.delegate,
63
+          GlobalMaterialLocalizations.delegate,
64
+          GlobalWidgetsLocalizations.delegate,
65
+          GlobalCupertinoLocalizations.delegate,
66
+        ],
67
+        localeResolutionCallback: (locale, supportedLocales) {
68
+          for (var supportedLocale in supportedLocales) {
69
+            if (supportedLocale.languageCode == locale.languageCode &&
70
+                supportedLocale.countryCode == locale.countryCode) {
71
+              return supportedLocale;
72
+            }
73
+          }
74
+          return supportedLocales.first;
75
+        },
76
+        onGenerateRoute: CustomRouter.generatedRoute,
77
+        initialRoute: homeRoute,
78
+      );
79
+    }
80
+  }
81
+}

+ 47
- 0
fast_med_flutter/pubspec.lock Целия файл

@@ -160,6 +160,11 @@ packages:
160 160
     description: flutter
161 161
     source: sdk
162 162
     version: "0.0.0"
163
+  flutter_localizations:
164
+    dependency: "direct main"
165
+    description: flutter
166
+    source: sdk
167
+    version: "0.0.0"
163 168
   flutter_login:
164 169
     dependency: "direct main"
165 170
     description:
@@ -338,6 +343,48 @@ packages:
338 343
       url: "https://pub.dartlang.org"
339 344
     source: hosted
340 345
     version: "2.1.5"
346
+  shared_preferences:
347
+    dependency: "direct main"
348
+    description:
349
+      name: shared_preferences
350
+      url: "https://pub.dartlang.org"
351
+    source: hosted
352
+    version: "0.5.12+4"
353
+  shared_preferences_linux:
354
+    dependency: transitive
355
+    description:
356
+      name: shared_preferences_linux
357
+      url: "https://pub.dartlang.org"
358
+    source: hosted
359
+    version: "0.0.2+4"
360
+  shared_preferences_macos:
361
+    dependency: transitive
362
+    description:
363
+      name: shared_preferences_macos
364
+      url: "https://pub.dartlang.org"
365
+    source: hosted
366
+    version: "0.0.1+11"
367
+  shared_preferences_platform_interface:
368
+    dependency: transitive
369
+    description:
370
+      name: shared_preferences_platform_interface
371
+      url: "https://pub.dartlang.org"
372
+    source: hosted
373
+    version: "1.0.4"
374
+  shared_preferences_web:
375
+    dependency: transitive
376
+    description:
377
+      name: shared_preferences_web
378
+      url: "https://pub.dartlang.org"
379
+    source: hosted
380
+    version: "0.1.2+7"
381
+  shared_preferences_windows:
382
+    dependency: transitive
383
+    description:
384
+      name: shared_preferences_windows
385
+      url: "https://pub.dartlang.org"
386
+    source: hosted
387
+    version: "0.0.1+3"
341 388
   simple_gesture_detector:
342 389
     dependency: transitive
343 390
     description:

+ 6
- 4
fast_med_flutter/pubspec.yaml Целия файл

@@ -24,10 +24,12 @@ dependencies:
24 24
   flutter:
25 25
     sdk: flutter
26 26
   url_launcher: ^5.4.0
27
+  shared_preferences: ^0.5.4+5
27 28
 
28 29
   firebase_helpers: ^0.1.8
29 30
   cloud_firestore: ^0.13.5
30
-
31
+  flutter_localizations:
32
+    sdk: flutter
31 33
 
32 34
   # The following adds the Cupertino Icons font to your application.
33 35
   # Use with the CupertinoIcons class for iOS style icons.
@@ -57,9 +59,9 @@ flutter:
57 59
   uses-material-design: true
58 60
 
59 61
   # To add assets to your application, add an assets section, like this:
60
-  # assets:
61
-  #   - images/a_dot_burr.jpeg
62
-  #   - images/a_dot_ham.jpeg
62
+  assets:
63
+    - lib/languages/en.json
64
+    - lib/languages/es.json
63 65
 
64 66
   # An image asset can refer to one or more resolution-specific "variants", see
65 67
   # https://flutter.dev/assets-and-images/#resolution-aware.