create static method

SetPassword create({
  1. bool schemeUtilsIsSetDefaultData = false,
  2. String special_type = "setPassword",
  3. String special_return_type = "passwordState",
  4. bool? is_tdlib_method,
  5. String? old_password,
  6. String? new_password,
  7. String? new_hint,
  8. bool? set_recovery_email_address,
  9. String? new_recovery_email_address,
})
override

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

Implementation

static SetPassword create({
  bool schemeUtilsIsSetDefaultData = false,
  String special_type = "setPassword",
  String special_return_type = "passwordState",
  bool? is_tdlib_method,
  String? old_password,
  String? new_password,
  String? new_hint,
  bool? set_recovery_email_address,
  String? new_recovery_email_address,
}) {
  // SetPassword setPassword = SetPassword({
  final Map setPassword_data_create_json = {
    "@type": special_type,
    "@return_type": special_return_type,
    "is_tdlib_method": is_tdlib_method,
    "old_password": old_password,
    "new_password": new_password,
    "new_hint": new_hint,
    "set_recovery_email_address": set_recovery_email_address,
    "new_recovery_email_address": new_recovery_email_address,
  };

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

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