DialogService class

A DialogService that uses the Get package to show dialogs from the business logic

Constructors

DialogService()

Properties

hashCode int
The hash code for this object.
no setterinherited
isDialogOpen bool?
Check if dialog is open
no setter
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

completeDialog(DialogResponse response) → void
Completes the dialog and passes the response to the caller
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerCustomDialogBuilder({required dynamic variant, required Widget builder(BuildContext, DialogRequest, dynamic (DialogResponse))}) → void
Registers a custom dialog builder. The builder function has been updated to include the function to call when you want to close the dialog. This improves readability and ease of use. When you want to close a dialog and return the result all you do is call the completer function passed in. i.e
registerCustomDialogBuilders(Map<dynamic, DialogBuilder> builders) → void
showConfirmationDialog({String? title, String? description, String cancelTitle = 'Cancel', Color? cancelTitleColor, String confirmationTitle = 'Ok', Color? confirmationTitleColor, bool barrierDismissible = false, DialogPlatform? dialogPlatform}) Future<DialogResponse?>
Shows a confirmation dialog with title and description
showCustomDialog<T, R>({dynamic variant, String? title, String? description, bool hasImage = false, String? imageUrl, bool showIconInMainButton = false, String? mainButtonTitle, bool showIconInSecondaryButton = false, String? secondaryButtonTitle, bool showIconInAdditionalButton = false, String? additionalButtonTitle, bool takesInput = false, Color barrierColor = Colors.black54, bool barrierDismissible = false, String barrierLabel = '', bool useSafeArea = true, dynamic customData, R? data}) Future<DialogResponse<T>?>
Creates a popup with the given widget, a scale animation, and faded background.
showDialog({String? title, String? description, String? cancelTitle, Color? cancelTitleColor, String buttonTitle = 'Ok', Color? buttonTitleColor, bool barrierDismissible = false, DialogPlatform? dialogPlatform}) Future<DialogResponse?>
Shows a dialog to the user
toString() String
A string representation of this object.
inherited

Operators

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