ButtonStateManager class

Manages button UI state

Constructors

ButtonStateManager()

Properties

hashCode int
The hash code for this object.
no setterinherited
isDisabled bool
no setter
isError bool
no setter
isLoading bool
no setter
isSuccess bool
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state ButtonState
no setter
text String
no setter

Methods

getBackgroundColor({Color? idleColor, Color? loadingColor, Color? successColor, Color? errorColor}) Color
Background color based on state
initialize(String initialText) → void
Initialize button state
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reset(String defaultText) → void
Reset button
setError(String errorText) → void
Set error state
setLoading() → void
Set loading state
setSuccess(String successText) → void
Set success state
stopLoading() → void
Stop loading and go back to idle
toString() String
A string representation of this object.
inherited

Operators

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