popupMaterialDialog<T> method

Future<T?> popupMaterialDialog<T>({
  1. WidgetBuilder? builder,
  2. DialogOptions? options,
})

Material 风格的 Dialog showDialog

Implementation

Future<T?> popupMaterialDialog<T>({
  WidgetBuilder? builder,
  DialogOptions? options,
}) {
  options = GlobalOptions().dialogOptions.merge(options);
  return showDialog(
      context: GlobalOptions().globalNavigatorKey.currentContext!,
      builder: builder ?? toWidgetBuilder,
      barrierColor: options.barrierColor,
      barrierLabel: options.barrierLabel,
      barrierDismissible: options.barrierDismissible,
      useRootNavigator: options.useRootNavigator,
      routeSettings: options.routeSettings,
      anchorPoint: options.anchorPoint,
      useSafeArea: options.useSafeArea);
}