StateAction class

StateAction class

Constructors

StateAction()

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(dynamic state, {required String language, bool restartState = true}) → void
Update the language in the application
confirmAction(dynamic state, {required dynamic action(), required String title, String dismissText = "nylo.confirm_action.cancel"}) → Future<void>
Perform a confirm action
lockRelease(dynamic state, String name, {required Function perform, bool shouldSetState = true, void onError(Object error, StackTrace stackTrace)?}) → void
Perform a lock release The lockRelease method will call the function provided in perform and then block the function from being called again until it has finished. An Exception from perform goes to onError (see NyBaseState.lockRelease).
pop(dynamic state, {dynamic result, bool rootNavigator = false}) → void
Pop the page
refreshPage(dynamic state, {dynamic setState()?}) → void
Refresh the page
setState(dynamic state, dynamic setState()) → void
Set the state of the page
showToastCustom(dynamic state, {String? title, required String description, String? id, Map<String, dynamic>? data}) → void
Display a custom Toast message. Use id to specify a custom toast style registered via Nylo.addToastNotifications.
showToastDanger(dynamic state, {String? title, required String description}) → void
Displays a Toast message containing "Error" for the title, you only need to provide a description.
showToastInfo(dynamic state, {String? title, required String description}) → void
Displays a Toast message containing "Info" for the title, you only need to provide a description.
showToastOops(dynamic state, {String? title, required String description}) → void
Displays a Toast message containing "Oops" for the title, you only need to provide a description.
showToastSorry(dynamic state, {String? title, required String description}) → void
Displays a Toast message containing "Sorry" for the title, you only need to provide a description.
showToastSuccess(dynamic state, {String? title, required String description}) → void
Displays a Toast message containing "Success" for the title, you only need to provide a description.
showToastWarning(dynamic state, {String? title, required String description}) → void
Displays a Toast message containing "Warning" for the title, you only need to provide a description.