StateAction class
StateAction class
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
-
changeLanguage(
String state, {required String language, bool restartState = true}) → dynamic - Update the language in the application
-
confirmAction(
String state, {required dynamic action(), required String title, String dismissText = "Cancel"}) → dynamic - Perform a confirm action
-
pop(
String state, {dynamic result}) → dynamic - Pop the page
-
refreshPage(
String state, {dynamic setState()?}) → dynamic - Refresh the page
-
setState(
String state, dynamic setState()) → dynamic - Set the state of the page
-
showToastCustom(
String state, {String? title, required String description, ToastNotificationStyleType? style}) → dynamic - Display a custom Toast message.
-
showToastDanger(
String state, {String? title, required String description, ToastNotificationStyleType? style}) → dynamic -
Displays a Toast message containing "Error" for the title, you
only need to provide a
description
. -
showToastInfo(
String state, {String? title, required String description, ToastNotificationStyleType? style}) → dynamic -
Displays a Toast message containing "Info" for the title, you
only need to provide a
description
. -
showToastOops(
String state, {String? title, required String description, ToastNotificationStyleType? style}) → dynamic -
Displays a Toast message containing "Oops" for the title, you
only need to provide a
description
. -
showToastSorry(
String state, {String? title, required String description, ToastNotificationStyleType? style}) → dynamic -
Displays a Toast message containing "Sorry" for the title, you
only need to provide a
description
. -
showToastSuccess(
String state, {String? title, required String description, ToastNotificationStyleType? style}) → dynamic -
Displays a Toast message containing "Success" for the title, you
only need to provide a
description
. -
showToastWarning(
String state, {String? title, required String description, ToastNotificationStyleType? style}) → dynamic -
Displays a Toast message containing "Warning" for the title, you
only need to provide a
description
. -
validate(
String state, {required Map< String, dynamic> rules, Map<String, dynamic> ? data, Map<String, dynamic> ? messages, bool showAlert = true, Duration? alertDuration, ToastNotificationStyleType alertStyle = ToastNotificationStyleType.WARNING, required dynamic onSuccess()?, dynamic onFailure(Exception exception)?, String? lockRelease}) → dynamic - Validate data from your widget.