putAccount static method

void putAccount(
  1. UserId? userId
)

Puts the provided UserId to the browser's storage.

Implementation

static void putAccount(UserId? userId) {
  if (userId == null) {
    web.window.localStorage.removeItem('account');
  } else {
    web.window.localStorage.setItem('account', userId.val);
  }
}