Session.fromMap constructor

Session.fromMap(
  1. Map<String, dynamic> map
)

Implementation

factory Session.fromMap(Map<String, dynamic> map) {
  return Session(
    $id: map['\$id'].toString(),
    $createdAt: map['\$createdAt'].toString(),
    $updatedAt: map['\$updatedAt'].toString(),
    userId: map['userId'].toString(),
    expire: map['expire'].toString(),
    provider: map['provider'].toString(),
    providerUid: map['providerUid'].toString(),
    providerAccessToken: map['providerAccessToken'].toString(),
    providerAccessTokenExpiry: map['providerAccessTokenExpiry'].toString(),
    providerRefreshToken: map['providerRefreshToken'].toString(),
    ip: map['ip'].toString(),
    osCode: map['osCode'].toString(),
    osName: map['osName'].toString(),
    osVersion: map['osVersion'].toString(),
    clientType: map['clientType'].toString(),
    clientCode: map['clientCode'].toString(),
    clientName: map['clientName'].toString(),
    clientVersion: map['clientVersion'].toString(),
    clientEngine: map['clientEngine'].toString(),
    clientEngineVersion: map['clientEngineVersion'].toString(),
    deviceName: map['deviceName'].toString(),
    deviceBrand: map['deviceBrand'].toString(),
    deviceModel: map['deviceModel'].toString(),
    countryCode: map['countryCode'].toString(),
    countryName: map['countryName'].toString(),
    current: map['current'],
    factors: map['factors'] ?? [],
    secret: map['secret'].toString(),
    mfaUpdatedAt: map['mfaUpdatedAt'].toString(),
  );
}