create static method

ChatBoost create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "chatBoost",
  3. String special_return_type = "chatBoost",
  4. String? id,
  5. num? count,
  6. ChatBoostSource? source,
  7. num? start_date,
  8. num? expiration_date,
})
override

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

Implementation

static ChatBoost create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "chatBoost",
  String special_return_type = "chatBoost",
  String? id,
  num? count,
  ChatBoostSource? source,
  num? start_date,
  num? expiration_date,
}) {
  // ChatBoost chatBoost = ChatBoost({
  final Map chatBoost_data_create_json = {
    "@type": special_type,
    "@return_type": special_return_type,
    "id": id,
    "count": count,
    "source": (source != null) ? source.toJson() : null,
    "start_date": start_date,
    "expiration_date": expiration_date,
  };

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

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