Last active
April 5, 2019 15:05
-
-
Save Jonathanlight/8ad5f9786f685ca931d1458e1af22882 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void main() => runApp(new MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return new MaterialApp( | |
title: 'Flutter I18n', | |
debugShowCheckedModeBanner: false, | |
theme: new ThemeData( | |
primarySwatch: Colors.green, | |
), | |
home: new MyHomePage(), | |
localizationsDelegates: [ | |
FlutterI18nDelegate( | |
useCountryCode: false, fallbackFile: 'fr', path: 'assets/i18n'), | |
GlobalMaterialLocalizations.delegate, | |
GlobalWidgetsLocalizations.delegate | |
], | |
); | |
} | |
} | |
class MyHomePage extends StatefulWidget { | |
@override | |
MyHomeState createState() => new MyHomeState(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment