AuthTokens class abstract
Access and refresh token pair returned by every auth endpoint.
- Available extensions
- Annotations
-
- @freezed
Constructors
- AuthTokens({required String accessToken, required String refreshToken, required int expiresIn})
-
constfactory
-
AuthTokens.fromJson(Map<
String, dynamic> json) -
factory
Properties
- accessToken → String
-
no setterinherited
-
copyWith
→ $AuthTokensCopyWith<
AuthTokens> -
Create a copy of AuthTokens
with the given fields replaced by the non-null parameter values.
no setterinherited
- expiresIn → int
-
Token lifetime in milliseconds.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- refreshToken → String
-
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
map<
TResult extends Object?> (TResult $default(_AuthTokens value)) → TResult -
Available on AuthTokens, provided by the AuthTokensPatterns extension
Aswitch-like method, using callbacks. -
mapOrNull<
TResult extends Object?> (TResult? $default(_AuthTokens value)?) → TResult? -
Available on AuthTokens, provided by the AuthTokensPatterns extension
A variant ofmapthat fallback to returningnull. -
maybeMap<
TResult extends Object?> (TResult $default(_AuthTokens value)?, {required TResult orElse()}) → TResult -
Available on AuthTokens, provided by the AuthTokensPatterns extension
A variant ofmapthat fallback to returningorElse. -
maybeWhen<
TResult extends Object?> (TResult $default(String accessToken, String refreshToken, int expiresIn)?, {required TResult orElse()}) → TResult -
Available on AuthTokens, provided by the AuthTokensPatterns extension
A variant ofwhenthat fallback to anorElsecallback. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Serializes this AuthTokens to a JSON map.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
when<
TResult extends Object?> (TResult $default(String accessToken, String refreshToken, int expiresIn)) → TResult -
Available on AuthTokens, provided by the AuthTokensPatterns extension
Aswitch-like method, using callbacks. -
whenOrNull<
TResult extends Object?> (TResult? $default(String accessToken, String refreshToken, int expiresIn)?) → TResult? -
Available on AuthTokens, provided by the AuthTokensPatterns extension
A variant ofwhenthat fallback to returningnull
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited