Dialogs class abstract

This class is used to display dialogs easily without worrying about what platform you use to display the dialog. It will automatically adapt to iOS or other platforms.

Constructors

Dialogs()

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

dialogWithOptions({required BuildContext context, required String title, required String message, bool barrierDismissible = true, String textLeftButton = 'OK', String textRightButton = 'Cancel', Function? onPressedLeftButton, Function? onPressedRightButton, DestructiveAction destructiveAction = DestructiveAction.right, DefaultAction defaultAction = DefaultAction.none, Color androidDestructiveColor = Colors.red, bool popByDefault = true}) Future<void>
Here is the dialog with options, it's useful if you want to pop up a dialog where you can choose between two options. One of them can be set as destructive action.
infoDialog({required BuildContext context, required String title, required String message, bool barrierDismissible = true, String buttonText = "Ok", bool popByDefault = true, Function? onPressed}) Future<void>
This method will display an informative dialog with just one button
loadingDialog({required BuildContext context, bool barrierDismissible = false, String? title}) Future<void>
This method will display a dialog with a loading indicator inside
textInputDialog({required BuildContext context, required String title, required String message, bool barrierDismissible = true, String textLeftButton = 'OK', String textRightButton = 'Cancel', Function? onPressedLeftButton, Function? onPressedRightButton, DestructiveAction destructiveAction = DestructiveAction.right, DefaultAction defaultAction = DefaultAction.none, Color androidDestructiveColor = Colors.red, bool popByDefault = true, bool hasSecondaryButton = true, String? placeholder, TextEditingController? controller, TextInputType? keyboardType, Function? onChanged, Function? onEditingComplete}) Future<void>
This method will display a dialog with two buttons that have actions