Closed wann2 closed 4 years ago
Hi, thanks. Yeah you can do that by changing the code below and at this widget.
void selectThisCountry(Country country) {
print(country);
_searchCountryController.clear();
Navigator.of(context).pop();
Future.delayed(Duration(milliseconds: 10)).whenComplete(() {
_countriesStreamController.close();
_countriesSink.close();
setState(() {
_selectedCountryIndex = countries.indexOf(country);
// change here
});
});
}
Great codes!
Is there any way that _selectedCountryIndex can be values according to the phone's country automatically at first?