showCountryPickerCupertinoBottomSheet static method
Future<CountryData?>
showCountryPickerCupertinoBottomSheet({
- required BuildContext context,
- CountryData? setInitialValue,
- bool? isScrollControlled,
- BoxConstraints? constraints,
- ShapeBorder? shape,
- bool? isDismissible,
- Color? backgroundColor,
- Color? barrierColor,
- double? elevation,
- AnimationController? transitionAnimationController,
- Clip? clipBehavior,
- bool? showDragHandle,
- bool? useSafeArea,
- double? heightOfPicker,
- Widget? selectionOverlay,
- double? magnification,
- bool? useMagnifier,
- double? squeeze,
- double? offAxisFraction,
- double? itemExtent,
- LayoutConfig? layoutConfig,
- CountryListConfig? countryListConfig,
- double? diameterRatio,
- dynamic onCountryChanged()?,
- EdgeInsets? countryTilePadding,
Implementation
static Future<CountryData?> showCountryPickerCupertinoBottomSheet(
{required BuildContext context,
CountryData? setInitialValue,
bool? isScrollControlled,
BoxConstraints? constraints,
ShapeBorder? shape,
bool? isDismissible,
Color? backgroundColor,
Color? barrierColor,
double? elevation,
AnimationController? transitionAnimationController,
Clip? clipBehavior,
bool? useRootNavigator,
bool? showDragHandle,
bool? useSafeArea,
double? heightOfPicker,
Widget? selectionOverlay,
double? magnification,
bool? useMagnifier,
double? squeeze,
double? offAxisFraction,
double? itemExtent,
LayoutConfig? layoutConfig,
CountryListConfig? countryListConfig,
double? diameterRatio,
Function(CountryData?)? onCountryChanged,
EdgeInsets? countryTilePadding}) async {
CountryData? countryData;
await showModalBottomSheet(
isScrollControlled: isScrollControlled ?? false,
constraints: constraints,
context: context,
shape: shape,
isDismissible: isDismissible ?? true,
backgroundColor: backgroundColor ?? Theme.of(context).bottomSheetTheme.modalBackgroundColor,
barrierColor: barrierColor ?? Theme.of(context).bottomSheetTheme.modalBarrierColor,
elevation: elevation ?? Theme.of(context).bottomSheetTheme.modalElevation,
transitionAnimationController: transitionAnimationController,
clipBehavior: clipBehavior,
useRootNavigator: useRootNavigator ?? false,
showDragHandle: showDragHandle,
useSafeArea: useSafeArea ?? false,
builder: (BuildContext context) {
return CountryPickerCupertinoBottomSheet(
diameterRatio: diameterRatio,
onChanged: onCountryChanged ??
(country) {
countryData = country;
},
setInitialValue: setInitialValue,
useMagnifier: useMagnifier ?? true,
countryTilePadding: countryTilePadding,
heightOfPicker: heightOfPicker,
selectionOverlayWidget: selectionOverlay,
magnification: magnification ?? 1.0,
squeeze: squeeze ?? 1.45,
offAxisFraction: offAxisFraction ?? 0.0,
itemExtent: itemExtent ?? 32,
backgroundColor: backgroundColor ?? Theme.of(context).bottomSheetTheme.modalBackgroundColor,
layoutConfig: layoutConfig,
countryListConfig: countryListConfig,
);
},
);
return countryData;
}