getCredentials static method
- UserId userId
 
Returns the stored in browser's storage Credentials identified by the provided UserId, if any.
Implementation
static Credentials? getCredentials(UserId userId) {
  if (web.window.localStorage.getItem('credentials_$userId') == null) {
    return null;
  } else {
    return Credentials.fromJson(
      json.decode(web.window.localStorage.getItem('credentials_$userId')!),
    );
  }
}