ArCaptchaController constructor
ArCaptchaController({
- required String siteKey,
- String lang = 'en',
- String domain = 'localhost',
- String onErrorMessage = 'Something went wrong, try again!',
- int errorPrint = 0,
- double captchaWidth = 550,
- double captchaHeight = 550,
- Color color = Colors.black,
- ThemeMode theme = ThemeMode.light,
- DataSize dataSize = DataSize.normal,
- bool dialogBarrierDismissible = true,
- double maxResponsiveDialogWidth = 600,
- bool needToShowLoadingOverlay = true,
- String? loadingOverlayText = 'Loading captcha ...',
- bool useInAppWebViewOnWeb = false,
- bool enableDebugLogging = false,
Constructor initializes required fields and builds the HTML section.
Implementation
ArCaptchaController({
required this.siteKey,
this.lang = 'en',
this.domain = 'localhost',
this.onErrorMessage = 'Something went wrong, try again!',
this.errorPrint = 0,
this.captchaWidth = 550,
this.captchaHeight = 550,
this.color = Colors.black,
this.theme = ThemeMode.light,
this.dataSize = DataSize.normal,
this.dialogBarrierDismissible = true,
this.maxResponsiveDialogWidth = 600,
this.needToShowLoadingOverlay = true,
this.loadingOverlayText = 'Loading captcha ...',
this.useInAppWebViewOnWeb = false,
this.enableDebugLogging = false,
}) {
_log(
'created domain=$domain siteKeyConfigured=${siteKey.isNotEmpty} '
'lang=$lang dataSize=${dataSize.name} theme=${theme.name} '
'captcha=${captchaWidth}x$captchaHeight '
'webMode=${useInAppWebViewOnWeb ? "inappwebview" : "html-element"}',
);
_htmlContent = _buildHtmlSection();
}