DialogService class

A service class to display and manage a stack of custom dialogs using OverlayEntry.

This service leverages the navigator overlay to display dialogs. It maintains a stack of active dialogs and provides methods to show, hide, and manage them.

Constructors

DialogService()

Properties

hashCode → int
The hash code for this object.
no setterinherited
isActive → bool
Checks if there are any active dialogs in the stack.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

hide([UniqueKey? key]) → void
Hides a specific dialog or the most recently shown dialog.
hideAll() → void
Hides all active dialogs in the stack.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
show({required BuildContext context, String title = 'Error', String? desc, DialogType type = DialogType.error}) → Future<UniqueKey>
Displays a custom dialog.
toString() → String
A string representation of this object.
inherited

Operators

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