showDialogAFib<TReturn extends Object?> method

void showDialogAFib<TReturn extends Object?>({
  1. required AFNavigatePushAction navigate,
  2. AFReturnValueDelegate<TReturn>? onReturn,
  3. bool barrierDismissible = true,
  4. Color? barrierColor,
  5. bool useSafeArea = true,
  6. bool useRootNavigator = true,
  7. RouteSettings? routeSettings,
  8. AFAsyncQuery? executeBefore,
  9. AFAsyncQuery? executeDuring,
})
inherited

Open a dialog with the specified screen id and param

You must either specify a screen id and param, or you can specify an AFNavigatePushAction that contains those two items instead.

Note that you will close the bottom sheet inside your bottomsheet screen using AFBuildContext.closeDialog and pass it a return value. You can capture that return value by passing in an onReturn delegate to this function.

A very common pattern is to pass back the route parameter for the bottom sheet, which looks like:

context.closeDialog(context.p);

inside the dialog screen.

Implementation

void showDialogAFib<TReturn extends Object?>({
  required AFNavigatePushAction navigate,
  AFReturnValueDelegate<TReturn>? onReturn,
  bool barrierDismissible = true,
  material.Color? barrierColor,
  bool useSafeArea = true,
  bool useRootNavigator = true,
  material.RouteSettings? routeSettings,
  AFAsyncQuery? executeBefore,
  AFAsyncQuery? executeDuring,
}) async {
  showDialogStatic<TReturn>(
    flutterContext: flutterContext,
    dispatch: this.dispatch,
    navigate: navigate,
    onReturn: onReturn,
    executeBefore: executeBefore,
    executeDuring: executeDuring,
    barrierDismissible: barrierDismissible,
    barrierColor: barrierColor,
    useSafeArea: useSafeArea,
    useRootNavigator: useRootNavigator,
    routeSettings: routeSettings,
  );
}