September 2019
Beginner
512 pages
12h 52m
English
With all files generated and all resources translated and ready for use, we now need to properly use them in the application. To do this, we need to set a few properties of the MaterialApp class. This is what our app class looks like:
class MyApp extends StatelessWidget { // This widget is the root of your application. @override Widget build(BuildContext context) { return new MaterialApp( localizationsDelegates: [ AppLocalizationsDelegate(), GlobalMaterialLocalizations.delegate, GlobalWidgetsLocalizations.delegate ], supportedLocales: [Locale("en"), Locale("es"), Locale("it")], onGenerateTitle: (BuildContext context) => AppLocalizations.of(context).title, theme: new ThemeData( primarySwatch: Colors.blue, ), home: ...Read now
Unlock full access