showPlatformDialog<T> function

Future<T> showPlatformDialog <T>(
  1. {@required BuildContext context,
  2. @required WidgetBuilder builder,
  3. @Deprecated('Use barrierDismissible.') bool androidBarrierDismissible: true,
  4. bool barrierDismissible,
  5. RouteSettings routeSettings,
  6. bool useRootNavigator: true,
  7. bool materialUseSafeArea: true,
  8. Color materialBarrierColor}
)

Implementation

Future<T> showPlatformDialog<T>({
  @required BuildContext context,
  @required WidgetBuilder builder,
  @Deprecated('Use barrierDismissible.') bool androidBarrierDismissible = true,
  bool barrierDismissible,
  RouteSettings routeSettings,
  bool useRootNavigator = true,
  bool materialUseSafeArea = true,
  Color materialBarrierColor,
}) {
  if (isMaterial(context)) {
    return showDialog<T>(
      context: context,
      builder: builder,
      barrierDismissible: barrierDismissible ?? androidBarrierDismissible,
      routeSettings: routeSettings,
      useRootNavigator: useRootNavigator,
      useSafeArea: materialUseSafeArea,
      //child: , deprecated
      barrierColor: materialBarrierColor,
    );
  } else {
    return showCupertinoDialog<T>(
      context: context,
      builder: builder,
      routeSettings: routeSettings,
      useRootNavigator: useRootNavigator,
      barrierDismissible: barrierDismissible ?? false,
    );
  }
}