openAdaptiveBottomSheet function

Future openAdaptiveBottomSheet(
  1. BuildContext context,
  2. Widget content,
  3. AdaptiveBottomSheetProps props
)

Implementation

Future openAdaptiveBottomSheet(
    BuildContext context, Widget content, AdaptiveBottomSheetProps props) {
  final ThemeData theme = Theme.of(context);
  switch (theme.platform) {
    case TargetPlatform.iOS:
    case TargetPlatform.macOS:
      return openCupertinoBottomSheet(context, content, props.cupertinoProps);
    case TargetPlatform.android:
    case TargetPlatform.fuchsia:
    case TargetPlatform.linux:
    case TargetPlatform.windows:
    default:
      return openMaterialBottomSheet(context, content, props.materialProps);
  }
}