Make an app's supported locales configurable (#11946)

* Make an app's supported locales configurable

* Added an supportedLocales.isNotEmpty assert

* WidgetsApp no longer const because supportedLocales.isNotEmpty

* updated per review feedback

* tweaked dartdoc to restart the build

* updated per review feedback

* Updated per review feedback
This commit is contained in:
Hans Muller
2017-09-08 16:47:40 -07:00
committed by Ian Hickson
parent 3bf3df33ea
commit 4262c1e9d3
5 changed files with 243 additions and 18 deletions

View File

@@ -121,6 +121,10 @@ class StocksAppState extends State<StocksApp> {
localizationsDelegates: <_StocksLocalizationsDelegate>[
new _StocksLocalizationsDelegate(),
],
supportedLocales: const <Locale>[
const Locale('en', 'US'),
const Locale('es', 'ES'),
],
debugShowMaterialGrid: _configuration.debugShowGrid,
showPerformanceOverlay: _configuration.showPerformanceOverlay,
showSemanticsDebugger: _configuration.showSemanticsDebugger,