showChallenge method
void
showChallenge(
- BuildContext context,
- Response response,
- ValueChanged<
String> onCaptchaResolved
Implementation
void showChallenge(BuildContext context, Response response,
ValueChanged<String> onCaptchaResolved) {
DataDomeLogger.info('Presenting the captcha');
isDisplayed = true;
showGeneralDialog(
context: context,
barrierDismissible: false,
pageBuilder: (context, __, ___) {
dialogContext = context;
var responsePage = responsePageFromResponse(response);
return new CaptchaPage(
responsePage: responsePage,
onCaptchaResolved: (value) {
DataDomeDio.storeCookie(value);
dismissCaptcha();
onCaptchaResolved(value);
});
},
);
}