AuthState class sealed

Used by NxFit consumers to indicate the current authentication state. Only two states are possible: Authenticated and Unauthenticated. When the user is authenticated, the AuthState will be set to Authenticated with the appropriate accessToken and userId. This will be used by the NxFit SDK when making HTTP calls to the NxFit API server.

See also AuthProvider

Implementers
Available extensions

Properties

accessToken String?

Available on AuthState, provided by the AuthStateExtensions extension

Returns the accessToken if the AuthState is Authenticated. Returns null otherwise.
no setter
hashCode int
The hash code for this object.
no setterinherited
isAuthenticated bool

Available on AuthState, provided by the AuthStateExtensions extension

Returns true if the AuthState is Authenticated.
no setter
isUnauthenticated bool

Available on AuthState, provided by the AuthStateExtensions extension

Returns true if the AuthState is Unauthenticated.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
userId int?

Available on AuthState, provided by the AuthStateExtensions extension

Returns the userId if the AuthState is Authenticated. Returns null otherwise.
no setter

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