create static method

StarSubscriptions create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "starSubscriptions",
  3. String special_return_type = "starSubscriptions",
  4. StarAmount? star_amount,
  5. List<StarSubscription>? subscriptions,
  6. num? required_star_count,
  7. String? next_offset,
})
override

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

Implementation

static StarSubscriptions create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "starSubscriptions",
  String special_return_type = "starSubscriptions",
  StarAmount? star_amount,
  List<StarSubscription>? subscriptions,
  num? required_star_count,
  String? next_offset,
}) {
  // StarSubscriptions starSubscriptions = StarSubscriptions({
  final Map starSubscriptions_data_create_json = {
    "@type": special_type,
    "@return_type": special_return_type,
    "star_amount": (star_amount != null) ? star_amount.toJson() : null,
    "subscriptions": (subscriptions != null) ? subscriptions.toJson() : null,
    "required_star_count": required_star_count,
    "next_offset": next_offset,
  };

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

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