accessToken property

String? accessToken

Implementation

String? get accessToken => _accessToken;
void accessToken=(String? value)

Set the access token

If the token is invalid, one of those Exception will be throw:

  • Invalid JWT format: Expected 3 parts, got [number of parts]
  • Unsupported signature algorithm: [algorithm]
  • Token expired at [DateTime]
  • Token issued in the future at [DateTime]

Implementation

set accessToken(String? value) {
  if (value != null) {
    _verifyJWTFormat(value);
  }
  _accessToken = value;
  notifyListeners();
}