create static method

PremiumGiftCodeInfo create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "premiumGiftCodeInfo",
  3. String special_return_type = "premiumGiftCodeInfo",
  4. MessageSender? creator_id,
  5. num? creation_date,
  6. bool? is_from_giveaway,
  7. num? giveaway_message_id,
  8. num? month_count,
  9. num? user_id,
  10. num? use_date,
})
override

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

Implementation

static PremiumGiftCodeInfo create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "premiumGiftCodeInfo",
  String special_return_type = "premiumGiftCodeInfo",
  MessageSender? creator_id,
  num? creation_date,
  bool? is_from_giveaway,
  num? giveaway_message_id,
  num? month_count,
  num? user_id,
  num? use_date,
}) {
  // PremiumGiftCodeInfo premiumGiftCodeInfo = PremiumGiftCodeInfo({
  final Map premiumGiftCodeInfo_data_create_json = {
    "@type": special_type,
    "@return_type": special_return_type,
    "creator_id": (creator_id != null) ? creator_id.toJson() : null,
    "creation_date": creation_date,
    "is_from_giveaway": is_from_giveaway,
    "giveaway_message_id": giveaway_message_id,
    "month_count": month_count,
    "user_id": user_id,
    "use_date": use_date,
  };

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

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