LazxStateWidget<T> class abstract

LazxStateWidget is a widget that will have different builder function depending on a LxState.

LazxStateWidget as been made to be used with a LazxDataBuilder to build a widget based on the LxState of a LazxData of type T.

It's an better version of an LazxWidget that reduce the boilerplate code to check the condition of a state and show something in consequence.

Mixed in types

Constructors

LazxStateWidget()

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

error(BuildContext context, T? data) Widget
This function is called when the LxState of the data is error.
initial(BuildContext context, T? data) Widget
A build function called when the LxState of the data is initial.
loading(BuildContext context, T? data) Widget
This function is called when the LxState of the data is loading.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
success(BuildContext context, T? data) Widget
This function is called when the LxState of the data is success.
toString() String
A string representation of this object.
inherited
viewModel<T extends LazxViewModel>(BuildContext context) → T
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited