write method
- AuthTokenModel token
override
Persists authentication tokens to secure storage.
The token contains the access and refresh tokens to store, typically
received after successful login or a token refresh. Tokens are encrypted
by SecureStorage and persist across app restarts until deleted.
Called by Fresh Dio after a successful token refresh or any operation that produces updated tokens.
Implementation
@override
Future<void> write(AuthTokenModel token) async {
await SecureStorage.instance.setAuthTokenModel(token);
}