defaultShowPlatformDialog<T> function

ShowPlatformDialog<T> defaultShowPlatformDialog<T>()

Implementation

ShowPlatformDialog<T> defaultShowPlatformDialog<T>() => ({
      required BuildContext context,
      required WidgetBuilder builder,
      bool? barrierDismissible,
      RouteSettings? routeSettings,
      bool useRootNavigator = true,
      bool materialUseSafeArea = true,
      Color? materialBarrierColor = Colors.black54,
      String? barrierLabel,
      Constraints? constraints,
      dynamic extraOptions,
    }) {
      if (isMaterial(context)) {
        return showDialog<T>(
          context: context,
          builder: builder,
          barrierDismissible: barrierDismissible ?? true,
          routeSettings: routeSettings,
          useRootNavigator: useRootNavigator,
          useSafeArea: materialUseSafeArea,
          //child: , deprecated
          barrierColor: materialBarrierColor,
          barrierLabel: barrierLabel,
        );
      } else {
        return showCupertinoDialog<T>(
          context: context,
          builder: builder,
          routeSettings: routeSettings,
          useRootNavigator: useRootNavigator,
          barrierDismissible: barrierDismissible ?? false,
          barrierLabel: barrierLabel,
        );
      }
    };