showPlatformModalSheet<T> function

Future<T> showPlatformModalSheet <T>(
  1. {@required BuildContext context,
  2. @required WidgetBuilder builder,
  3. Color androidBackgroundColor,
  4. double androidElevation,
  5. ShapeBorder androidShape,
  6. bool androidIsScrollControlled: false,
  7. bool androidUseRootNavigator: false,
  8. Clip androidClipBehavior}
)

Displays either the showModalBottomSheet for material or showCupertinoModalPopup for cupertino

Implementation

Future<T> showPlatformModalSheet<T>({
  @required BuildContext context,
  @required WidgetBuilder builder,
  Color androidBackgroundColor,
  double androidElevation,
  ShapeBorder androidShape,
  bool androidIsScrollControlled = false,
  bool androidUseRootNavigator = false,
  Clip androidClipBehavior,
}) {
  if (isMaterial(context)) {
    return showModalBottomSheet<T>(
      context: context,
      builder: builder,
      backgroundColor: androidBackgroundColor,
      elevation: androidElevation,
      shape: androidShape,
      isScrollControlled: androidIsScrollControlled,
      useRootNavigator: androidUseRootNavigator,
      clipBehavior: androidClipBehavior,
    );
  } else {
    return showCupertinoModalPopup<T>(
      context: context,
      builder: builder,
    );
  }
}