fromJson static method

Sessions? fromJson(
  1. Map<String, dynamic>? json
)

Implementation

static Sessions? fromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return null;
  }

  return Sessions(
    sessions: List<Session>.from(
      tdListFromJson(json['sessions'])
          .map((item) => Session.fromJson(tdMapFromJson(item)))
          .whereType<Session>(),
    ),
    inactiveSessionTtlDays: (json['inactive_session_ttl_days'] as int?) ?? 0,
  );
}