#85: localize on init

This commit is contained in:
Salvatore Giordano
2020-06-14 15:57:01 +02:00
parent 1172268651
commit 24ba175b76
2 changed files with 3 additions and 3 deletions

View File

@@ -175,6 +175,7 @@ class CountryCodePickerState extends State<CountryCodePicker> {
super.didChangeDependencies();
this.elements = elements.map((e) => e.localize(context)).toList();
_onInit(selectedItem);
}
@override
@@ -212,8 +213,6 @@ class CountryCodePickerState extends State<CountryCodePicker> {
selectedItem = elements[0];
}
_onInit(selectedItem);
favoriteElements = elements
.where((e) =>
widget.favorite.firstWhere(