mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Merge pull request #817 from sethladd/sethladd-patch-1
use async / await
This commit is contained in:
commit
0d8541ebdf
@ -94,12 +94,11 @@ class StocksAppState extends State<StocksApp> {
|
||||
return null;
|
||||
}
|
||||
|
||||
Future<LocaleQueryData> _onLocaleChanged(ui.Locale locale) {
|
||||
Future<LocaleQueryData> _onLocaleChanged(ui.Locale locale) async {
|
||||
String localeString = locale.toString();
|
||||
return initializeMessages(localeString).then((_) {
|
||||
Intl.defaultLocale = localeString;
|
||||
return StockStrings.instance;
|
||||
});
|
||||
await initializeMessages(localeString);
|
||||
Intl.defaultLocale = localeString;
|
||||
return StockStrings.instance;
|
||||
}
|
||||
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user