showBottomSheet function
Future<Country?>
showBottomSheet({
- required BuildContext context,
- required Country defaultCountry,
- required bool withBottomSheet,
Implementation
Future<Country?> showBottomSheet({
required BuildContext context,
required Country defaultCountry,
required bool withBottomSheet,
}) async {
assert(Country.findCountryByIsoCode(defaultCountry.isoCode) != null);
return await showModalBottomSheet<Country>(
context: context,
backgroundColor: Colors.white,
isScrollControlled: true,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
isDismissible: true,
builder: (context) {
return _CountryPickerDialog(
defaultCountry: defaultCountry,
withBottomSheet: withBottomSheet,
);
});
}