openAdaptiveModalBottomSheet function

Future openAdaptiveModalBottomSheet(
  1. BuildContext context,
  2. Widget content,
  3. AdaptiveModalBottomSheetProps props,
  4. List<CupertinoActionSheetAction>? defaultCupertinoActions,
)

Implementation

Future openAdaptiveModalBottomSheet(
  BuildContext context,
  Widget content,
  AdaptiveModalBottomSheetProps props,
  List<CupertinoActionSheetAction>? defaultCupertinoActions,
) {
  final ThemeData theme = Theme.of(context);
  switch (theme.platform) {
    case TargetPlatform.iOS:
    case TargetPlatform.macOS:
      return openCupertinoModalBottomSheet(
          context, content, props.cupertinoProps, defaultCupertinoActions);
    case TargetPlatform.android:
    case TargetPlatform.fuchsia:
    case TargetPlatform.linux:
    case TargetPlatform.windows:
    default:
      return openMaterialModalBottomSheet(
          context, content, props.materialProps);
  }
}