create static method

Sessions create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "sessions",
  3. String special_return_type = "sessions",
  4. List<Session>? sessions,
  5. num? inactive_session_ttl_days,
})
override

Generate By AZKADEV | Azka Axelion Gibran Script Dont edit by hand or anything manual

Implementation

static Sessions create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "sessions",
  String special_return_type = "sessions",
  List<Session>? sessions,
  num? inactive_session_ttl_days,
}) {
  // Sessions sessions = Sessions({
  final Map sessions_data_create_json = {
    "@type": special_type,
    "@return_type": special_return_type,
    "sessions": (sessions != null) ? sessions.toJson() : null,
    "inactive_session_ttl_days": inactive_session_ttl_days,
  };

  sessions_data_create_json.removeWhere((key, value) => value == null);

  if (schemeUtilsIsSetDefaultData) {
    defaultData.forEach((key, value) {
      if (sessions_data_create_json.containsKey(key) == false) {
        sessions_data_create_json[key] = value;
      }
    });
  }
  return Sessions(sessions_data_create_json);
}