DialogueHelper class Null safety

A helper class which contains functions for showing common dialogues and also contains common widgets used in those dialogues.

This allows for a consistency in the dialogues.

Constructors

DialogueHelper()

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent 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

cancelButton(BuildContext context) Widget
A dialogue cancel button which simply closes the popup.
okButton(Future<void> okPressed()?) Widget
A dialogue 'OK' button which executes okPressed when pressed.
saveButton(Future<void> savePressed()?) Widget
A dialogue 'Save' button which executes savePressed when pressed.
showConfirmationDialogue({required BuildContext context, required String title, required String message, required String confirmationActionText, required Future<void> onConfirm()}) → void
Shows a confirmation dialogue to allow the user to confirm some action. For example, so save a message or save a screen's settings. [...]
showDestructiveDialogue({required BuildContext context, required String title, required String message, required Future<void> onConfirm()}) → void
Shows a destructive dialogue containing a negative title and message, for confirming the execution of a destructive action. For example, deleting a message. [...]
showErrorDialogue(BuildContext context, String title, Exception exception) → void
Shows an error dialogue whos body contains information about an Exception. [...]
showSuccessDialogue(BuildContext context, String title, String message) Future<void>
Shows a success dialogue containing a positive title and message. [...]