create static method

NotificationGroup create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "notificationGroup",
  3. String special_return_type = "notificationGroup",
  4. num? id,
  5. NotificationGroupType? type,
  6. num? chat_id,
  7. num? total_count,
  8. List<Notification>? notifications,
})
override

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

Implementation

static NotificationGroup create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "notificationGroup",
  String special_return_type = "notificationGroup",
  num? id,
  NotificationGroupType? type,
  num? chat_id,
  num? total_count,
  List<Notification>? notifications,
}) {
  // NotificationGroup notificationGroup = NotificationGroup({
  final Map notificationGroup_data_create_json = {
    "@type": special_type,
    "@return_type": special_return_type,
    "id": id,
    "type": (type != null) ? type.toJson() : null,
    "chat_id": chat_id,
    "total_count": total_count,
    "notifications": (notifications != null) ? notifications.toJson() : null,
  };

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

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