UserModel constructor

UserModel(
  1. WidgetModel parent, {
  2. String? jwt,
})

Implementation

UserModel(WidgetModel parent, {String? jwt})
    : super(parent, myId, scope: Scope(id: myId)) {
  // load the config
  initialized = initialize();

  // set token
  if (jwt != null) {
    var token = Jwt(jwt);
    if (token.valid) {
      _jwt = token;
      logon(token);
    }
  }
}