showPlatformModalSheet<T> function

Future<T> showPlatformModalSheet <T>(
  1. {@required BuildContext context,
  2. @required WidgetBuilder builder,
  3. MaterialModalSheetData material,
  4. CupertinoModalSheetData cupertino}
)

Displays either the showModalBottomSheet for material or showCupertinoModalPopup for cupertino

Implementation

Future<T> showPlatformModalSheet<T>({
  @required BuildContext context,
  @required WidgetBuilder builder,
  MaterialModalSheetData material,
  CupertinoModalSheetData cupertino,
}) {
  if (isMaterial(context)) {
    return showModalBottomSheet<T>(
      context: context,
      builder: builder,
      backgroundColor: material?.backgroundColor,
      elevation: material?.elevation,
      shape: material?.shape,
      isScrollControlled: material?.isScrollControlled ?? false,
      useRootNavigator: material?.useRootNavigator ?? false,
      clipBehavior: material?.clipBehavior,
      barrierColor: material?.barrierColor,
      enableDrag: material?.enableDrag ?? true,
      isDismissible: material?.isDismissible ?? true,
      routeSettings: material?.routeSettings,
    );
  } else {
    return showCupertinoModalPopup<T>(
      context: context,
      builder: builder,
      filter: cupertino?.imageFilter,
      semanticsDismissible: cupertino?.semanticsDismissible,
      useRootNavigator: cupertino?.useRootNavigator ?? true,
    );
  }
}