fromMap static method

ClickWordCaptchaModel fromMap(
  1. Map<String, dynamic> map
)

Implementation

static ClickWordCaptchaModel fromMap(Map<String, dynamic> map) {
  ClickWordCaptchaModel captchaModel = ClickWordCaptchaModel();
  captchaModel.imgStr = map["originalImageBase64"] ?? "";
  captchaModel.token = map["token"] ?? "";
  captchaModel.secretKey = map["secretKey"] ?? "";
  captchaModel.wordList = map["wordList"] ?? [];

  if (!ObjectUtils.isListEmpty(captchaModel.wordList)) {
    captchaModel.wordStr = captchaModel.wordList.join(",");
  }

  return captchaModel;
}