showCountryPicker function
Future<Country?>
showCountryPicker({
- required BuildContext context,
- required Country defaultCountry,
Implementation
Future<Country?> showCountryPicker({
required BuildContext context,
required Country defaultCountry,
}) async {
assert(Country.findCountryByIsoCode(defaultCountry.isoCode) != null);
return await showDialog<Country>(
context: context,
barrierDismissible: true,
builder: (BuildContext context) => _CountryPickerDialog(
defaultCountry: defaultCountry,
withBottomSheet: false,
),
);
}