TAlertService class
Service for displaying alert dialogs.
TAlertService provides static methods to show varying types of alerts:
- Info, Success, Warning, Error
- Confirmations (Archive, Restore, Delete)
- Custom alerts with show
Constructors
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
-
confirmArchive(
BuildContext context, VoidCallback onConfirm, {String? name}) → void - Shows a confirmation dialog for archiving an item.
-
confirmDelete(
BuildContext context, VoidCallback onConfirm, {String? name}) → void - Shows a confirmation dialog for deleting an item.
-
confirmRestore(
BuildContext context, VoidCallback onConfirm, {String? name}) → void - Shows a confirmation dialog for restoring an item.
-
error(
BuildContext context, String title, String message) → void - Shows an error alert.
-
info(
BuildContext context, String title, String message) → void - Shows an informational alert.
-
show(
BuildContext context, {dynamic text, String? title, IconData? icon, Color? color, AlertButton? closeButton, AlertButton? confirmButton}) → Future< void> - Shows a custom alert dialog.
-
success(
BuildContext context, String title, String message) → void - Shows a success alert.
-
warning(
BuildContext context, String title, String message) → void - Shows a warning alert.