RxStatusType enum

Reactive Status for state management.

Represents the current status of an async operation. Used with MagicStateMixin to handle loading/success/error states.

Usage

class UserController extends MagicController with MagicStateMixin<User> {
  Future<void> fetchUser() async {
    change(null, status: RxStatus.loading());
    try {
      final user = await api.getUser();
      change(user, status: RxStatus.success());
    } catch (e) {
      change(null, status: RxStatus.error(e.toString()));
    }
  }
}
Inheritance
Available extensions

Values

empty → const RxStatusType

Initial state, no data loaded yet.

loading → const RxStatusType

Data is being loaded.

success → const RxStatusType

Data loaded successfully.

error → const RxStatusType

An error occurred.

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
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

Constants

values → const List<RxStatusType>
A constant List of the values in this enum, in order of their declaration.