ModalDialog class

The ModalDialog class is a collection of static methods that can be used to show different types of modal dialogs.

Constructors

ModalDialog()

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

confirmation({required BuildContext context, required ModalTitle title, required String message, ModalButton? confirmButton, ModalButton? cancelButton}) → dynamic
Shows a dialog with a title, a message and two buttons. The buttons are labeled "Yes" and "No" by default, but you can change them by passing the yesButtonText and noButtonText parameters.
detailed({required BuildContext context, required ModalTitle title, required String message, ModalDetail? detail, required ModalButton button}) → dynamic
Shows a detailed dialog with a title, a message, a button and an optional detail. If the color of the button is not defined, it will be #FCE444 by default. If the color of the title is not defined, it will be #303F9F by default. If the detail is shown, a divider will be shown between the button and the detail. You can define the text that will be shown when the detail is hidden and the text that will be shown when the detail is expanded.
simple({required BuildContext context, required ModalTitle title, required ModalButton button}) → dynamic
Shows a simple dialog with a title and a button. If the color of the button is not defined, it will be #FCE444 by default.
waiting({required BuildContext context, required ModalTitle title, String? message}) → dynamic
Shows a dialog with a title and a message. This dialog can only be dismissed by the application, since it has no buttons. You should pair this dialog with a Future.delayed() and a Navigator.pop() to dismiss it.