SmartDialog class

Ad-aware wrappers for dialogs and modal surfaces.

Use these methods instead of Flutter's dialog helpers whenever a banner may be visible. They hide banners for the entire modal lifetime and block app-open ads while the modal is active. Every wrapper restores ad state in a finally block, including when the modal is dismissed with an error.

Constructors

SmartDialog()

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

show<T>({required BuildContext context, required WidgetBuilder builder, bool barrierDismissible = true, Color? barrierColor, String? barrierLabel, bool useSafeArea = true, RouteSettings? routeSettings}) → Future<T?>
Show a dialog and automatically hide/show banner ads
showActionSheet<T>({required BuildContext context, required Widget actionSheet}) → Future<T?>
Show a Cupertino action sheet
showBottomSheet<T>({required BuildContext context, required Widget builder(BuildContext), Color? backgroundColor, double? elevation, ShapeBorder? shape, Clip? clipBehavior, BoxConstraints? constraints, bool? enableDrag, bool isScrollControlled = false, bool isDismissible = true, bool? useRootNavigator}) → Future<T?>
Show a Material bottom sheet
showCupertinoDialog<T>({required BuildContext context, required Widget dialog, bool barrierDismissible = false}) → Future<T?>
Show a Cupertino dialog
showDatePicker({required BuildContext context, required DateTime initialDate, required DateTime firstDate, required DateTime lastDate, DateTime? currentDate, DatePickerEntryMode initialEntryMode = DatePickerEntryMode.calendar, String? helpText, String? cancelText, String? confirmText}) → Future<DateTime?>
Show a date picker and hide banner
showMaterialDialog<T>({required BuildContext context, required Widget dialog, bool barrierDismissible = true}) → Future<T?>
Show a Material dialog (AlertDialog, SimpleDialog, etc.)
showTimePicker({required BuildContext context, required TimeOfDay initialTime, String? helpText, String? cancelText, String? confirmText}) → Future<TimeOfDay?>
Show a time picker and hide banner