create static method
CaptchaResult
create({
- bool schemeUtilsIsSetDefaultData = false,
- String special_type = "captchaResult",
- String? type,
- Emoji? emoji_answer,
- List<
String> ? random_words, - List<
String> ? words,
override
return original data json
Implementation
static CaptchaResult create({
bool schemeUtilsIsSetDefaultData = false,
String special_type = "captchaResult",
String? type,
Emoji? emoji_answer,
List<String>? random_words,
List<String>? words,
}) {
// CaptchaResult captchaResult = CaptchaResult({
final Map captchaResult_data_create_json = {
"@type": special_type,
"type": type,
"emoji_answer": (emoji_answer != null) ? emoji_answer.toJson() : null,
"random_words": random_words,
"words": words,
};
captchaResult_data_create_json.removeWhere((key, value) => value == null);
if (schemeUtilsIsSetDefaultData) {
defaultData.forEach((key, value) {
if (captchaResult_data_create_json.containsKey(key) == false) {
captchaResult_data_create_json[key] = value;
}
});
}
return CaptchaResult(captchaResult_data_create_json);
}