LoginResponse.fromJson constructor

LoginResponse.fromJson(
  1. Map<String, Object?> json
)

Implementation

LoginResponse.fromJson(Map<String, Object?> json)
    : accessToken = json['access_token'] as String,
      deviceId = json['device_id'] as String,
      expiresInMs =
          ((v) => v != null ? v as int : null)(json['expires_in_ms']),
      noDe = ((v) => v != null ? v as String : null)(json['home_server']),
      refreshToken =
          ((v) => v != null ? v as String : null)(json['refresh_token']),
      userId = json['user_id'] as String,
      wellKnown = ((v) => v != null
          ? DiscoveryInformation.fromJson(v as Map<String, Object?>)
          : null)(json['well_known']);