create static method

AccountData create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "accountData",
  3. num? id,
  4. String? first_name,
  5. String? last_name,
  6. String? username,
  7. String? profile_picture,
  8. String? bio,
  9. List<LinkData>? social_medias,
})
override

Generated

Implementation

static AccountData create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "accountData",
  num? id,
  String? first_name,
  String? last_name,
  String? username,
  String? profile_picture,
  String? bio,
  List<LinkData>? social_medias,
}) {
  // AccountData accountData = AccountData({
  final Map accountData_data_create_json = {
    "@type": special_type,
    "id": id,
    "first_name": first_name,
    "last_name": last_name,
    "username": username,
    "profile_picture": profile_picture,
    "bio": bio,
    "social_medias": (social_medias != null) ? social_medias.toJson() : null,
  };

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

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