openCountryBottomSheet function

Future<Country?> openCountryBottomSheet(
  1. BuildContext context, {
  2. String? search,
  3. String? selectedHint,
  4. ValueChanged<Country>? onValuePicked,
  5. ValueChanged<Country>? onSelectedCountry,
  6. double? sheetHeight,
  7. bool useSafeArea = false,
})

Implementation

Future<Country?> openCountryBottomSheet(BuildContext context,
    {String? search,
    String? selectedHint,
    ValueChanged<Country>? onValuePicked,
    ValueChanged<Country>? onSelectedCountry,
    double? sheetHeight,
    bool useSafeArea = false}) async {
  return showModalBottomSheet<Country>(
    context: context,
    isScrollControlled: true,
    useSafeArea: useSafeArea,
    builder: (BuildContext context) {
      return MyCountryPickerBottomSheet(
        searchHint: search,
        selectHint: selectedHint,
        onValuePicked: onValuePicked,
        sheetHeight: sheetHeight,
      );
    },
  );
}