Commit 0d8541eb authored by Seth Ladd's avatar Seth Ladd

Merge pull request #817 from sethladd/sethladd-patch-1

use async / await
parents 724388d2 2666628b
...@@ -94,12 +94,11 @@ class StocksAppState extends State<StocksApp> { ...@@ -94,12 +94,11 @@ class StocksAppState extends State<StocksApp> {
return null; return null;
} }
Future<LocaleQueryData> _onLocaleChanged(ui.Locale locale) { Future<LocaleQueryData> _onLocaleChanged(ui.Locale locale) async {
String localeString = locale.toString(); String localeString = locale.toString();
return initializeMessages(localeString).then((_) { await initializeMessages(localeString);
Intl.defaultLocale = localeString; Intl.defaultLocale = localeString;
return StockStrings.instance; return StockStrings.instance;
});
} }
Widget build(BuildContext context) { 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