update method Null safety

Future<GWAccount> update()

Updates the account instance and returns it

Implementation

Future<GWAccount> update() async {
  var data = await Requests.get<Map<String, dynamic>>(
    '/me',
    auths[id]!.headers,
  );

  GWAccount account = GWAccount._fromJson(data, password);
  this.quota = account.quota;
  this.used = account.used;
  this.isDisabled = account.isDisabled;
  this.isDeleted = account.isDeleted;
  this.updatedAt = account.updatedAt;
  auths[id] = Auth(account, auths[id]!.token);
  return account;
}