Commit 2666628b authored by Seth Ladd's avatar Seth Ladd

use async / await

parent 724388d2
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment