showCaptcha method

void showCaptcha(
  1. BuildContext context,
  2. String? captchaUrl,
  3. ValueChanged<String> onCaptchaResolved
)

Implementation

void showCaptcha(BuildContext context, String? captchaUrl, ValueChanged<String> onCaptchaResolved) {
  DataDomeLogger.info('Presenting the captcha');

  CaptchaPage.isDisplayed = true;
  showGeneralDialog(
    context: context,
    barrierDismissible: false,
    pageBuilder: (context, __, ___) {
      dialogContext = context;
      return new CaptchaPage(captchaUrl: captchaUrl, onCaptchaResolved: (value){
        DataDomeDio.storeCookie(value);
        dismissCaptcha();
        onCaptchaResolved(value);
      });
    },
  );
}