show<T extends Object?> static method

Future<T?> show<T extends Object?>({
  1. required BuildContext context,
  2. required Widget gallery,
})

Displays a dialog with the provided gallery above the current contents.

Implementation

static Future<T?> show<T extends Object?>({
  required BuildContext context,
  required Widget gallery,
}) {
  final style = Theme.of(context).style;

  return showGeneralDialog(
    context: context,
    pageBuilder:
        (
          BuildContext buildContext,
          Animation<double> animation,
          Animation<double> secondaryAnimation,
        ) {
          return gallery;
        },
    barrierDismissible: false,
    barrierColor: style.colors.transparent,
    transitionDuration: Duration.zero,
    useRootNavigator: context.isMobile ? false : true,
  );
}