fromMap static method

Sessions? fromMap(
  1. Map<String, dynamic>? _map
)
override

Construct from Map.

Implementation

static Sessions? fromMap(Map<String, dynamic>? _map) {
  if (_map == null) return null;
  var _ = _map["@type"];
  if (_ != CONSTRUCTOR) return null;
  var extra = _map['@extra'];
  var clientId = _map['@clientId'];
  var sessions = List<Session>.from(
    (_map["sessions"] ?? []).map(
      (e) => Session.fromMap(e),
    ),
  );
  var inactive_session_ttl_days = _map['inactive_session_ttl_days']! as int;
  return Sessions(
    extra: extra,
    clientId: clientId,
    sessions: sessions,
    inactive_session_ttl_days: inactive_session_ttl_days,
  );
}