UserTokenState class

The state of userTokenProvider

Inheritance

Constructors

UserTokenState()

Properties

future → Future<UserToken>
Obtains a Future that resolves with the first state value that is not AsyncLoading.
read-onlyinherited
hashCode → int
The hash code for this object.
read-onlyinherited
lbPlannerApiAuthService ↔ AuthService
The AuthService used to authenticate for the LB Planner API.
read / write
localConfigService ↔ LocalConfigService<UserToken>
The LocalConfigService used to load and save the user token.
read / write
moodleMobileAppAuthService ↔ AuthService
The AuthService used to authenticate for the Moodle Mobile App API.
read / write
ref → AsyncNotifierProviderRef<UserToken>
The Ref from the provider associated with this AsyncNotifier.
read-onlyinherited
runtimeType → Type
A representation of the runtime type of the object.
read-onlyinherited
state ↔ AsyncValue<UserToken>
The value currently exposed by this AsyncNotifier.
read / writeinherited

Methods

build() → FutureOr<UserToken>
Initialize an AsyncNotifier.
override
login(String username, String password) → Future<void>
Logs the user in.
logout() → Future<void>
Logs the user out.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited
update(FutureOr<UserToken> cb(UserToken), {FutureOr<UserToken> onError(Object err, StackTrace stackTrace)?}) → Future<UserToken>
A function to update state from its previous value, while abstracting loading/error cases for state.
inherited
updateShouldNotify(AsyncValue<UserToken> previous, AsyncValue<UserToken> next) → bool
A method invoked when the state exposed by this AsyncNotifier changes.
inherited

Operators

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