LxResponse<T> class

LxResponse is a base object for a response from an API for example to handle state and data

T is the type of the data returned

Constructors

LxResponse({bool success = false, T? data, String? error})
By default, a response success is false

Properties

data ↔ T?
Your data object, can be null in case of error
getter/setter pair
error String?
Your error message that you would like to display
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
success bool
Value that check if the data is retrieved successfully
getter/setter pair

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