showCountryPickerBottomSheet static method
Future<CountryData?>
showCountryPickerBottomSheet({
- required BuildContext context,
- Color? backgroundColor,
- LayoutConfig? layoutConfig,
- List<
String> ? favouriteCountries, - CountryListConfig? countryListConfig,
- SearchStyle? searchStyle,
- Widget? closeIconWidget,
- ShapeBorder? shape,
- Color? barrierColor,
- bool? useSafeArea,
- bool? isDismissible,
- Offset? anchorPoint,
- Clip? clipBehavior,
- bool? showSearchBar,
- BoxConstraints? constraints,
- bool? isScrollControlled,
- Text? header,
- String? barrierLabel,
- WidgetBuilder? emptySearchBuilder,
- double? elevation,
- bool? enableDrag,
- RouteSettings? routeSettings,
- EdgeInsetsGeometry? countryTilePadding,
- double? scrollControlDisabledMaxHeightRatio,
- bool? showDragHandle,
- AnimationController? transitionAnimationController,
Implementation
static Future<CountryData?> showCountryPickerBottomSheet(
{required BuildContext context,
Color? backgroundColor,
LayoutConfig? layoutConfig,
List<String>? favouriteCountries,
CountryListConfig? countryListConfig,
SearchStyle? searchStyle,
Widget? closeIconWidget,
ShapeBorder? shape,
Color? barrierColor,
bool? useSafeArea,
bool? isDismissible,
Offset? anchorPoint,
Clip? clipBehavior,
bool? showSearchBar,
BoxConstraints? constraints,
bool? isScrollControlled,
Text? header,
String? barrierLabel,
WidgetBuilder? emptySearchBuilder,
double? elevation,
bool? enableDrag,
RouteSettings? routeSettings,
EdgeInsetsGeometry? countryTilePadding,
double? scrollControlDisabledMaxHeightRatio,
bool? showDragHandle,
AnimationController? transitionAnimationController,
bool? useRootNavigator}) async {
return await showModalBottomSheet(
backgroundColor:
backgroundColor ?? Theme.of(context).bottomSheetTheme.backgroundColor,
shape: shape,
barrierColor:
barrierColor ?? Theme.of(context).bottomSheetTheme.modalBarrierColor,
useSafeArea: useSafeArea ?? false,
isDismissible: isDismissible ?? true,
anchorPoint: anchorPoint,
constraints: constraints,
clipBehavior:
clipBehavior ?? Theme.of(context).bottomSheetTheme.clipBehavior,
isScrollControlled: isScrollControlled ?? false,
barrierLabel: barrierLabel,
elevation: elevation ?? Theme.of(context).bottomSheetTheme.elevation,
enableDrag: enableDrag ?? true,
routeSettings: routeSettings,
scrollControlDisabledMaxHeightRatio:
scrollControlDisabledMaxHeightRatio ?? 9.0 / 16.0,
showDragHandle: showDragHandle ?? false,
transitionAnimationController: transitionAnimationController,
useRootNavigator: useRootNavigator ?? false,
context: context,
builder: (_) {
return CountrySelectionBottomSheet(
favouriteCountries: favouriteCountries,
searchStyle: searchStyle,
countryListConfig: countryListConfig,
layoutConfig: layoutConfig,
showSearchBar: showSearchBar,
header: header,
emptySearchBuilder: emptySearchBuilder,
closeIconWidget: closeIconWidget,
countryTilePadding: countryTilePadding,
);
},
);
}