ArCaptchaController class

Controller for displaying and managing ArCaptcha widgets across different UI modes (dialog, screen, modal bottom sheet, or responsive dialog).

Constructors

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 = 450, Color color = Colors.black, ThemeMode theme = ThemeMode.light, DataSize dataSize = DataSize.normal, bool dialogBarrierDismissible = true, double maxResponsiveDialogWidth = 600})
Constructor initializes required fields and builds the HTML section.

Properties

captchaHeight → double
The height of the captcha widget container.
final
captchaWidth → double
The width of the captcha when mode is CaptchaType.dialog or CaptchaType.responsiveDialog.
final
color → Color
Set color of every colored element in widget. Like checkbox color See supported color in colorToString() function
final
dataSize → DataSize
Controls the display mode of the captcha checkbox.
final
dialogBarrierDismissible → bool
Controls whether dialog / responsive dialog can be dismissed by tapping outside.
final
domain → String
The domain name of the app (default: localhost). If use in production mood you should pass domain Url
final
errorPrint → int
Controls whether error messages appear below the captcha checkbox.
final
hashCode → int
The hash code for this object.
no setterinherited
lang → String
The language code (en or fa).
final
maxResponsiveDialogWidth → double
The maximum width of the responsive dialog. Defaults to 600 if not set.
final
onErrorMessage → String
Default error message when captcha fails.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
siteKey → String
Your ArCaptcha site key (required).
final
theme → ThemeMode
The theme mode (light or dark).
final

Methods

colorToString(Color color) → String
Converts a Color object to a CSS-compatible hex color string in the format #RRGGBB.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
showCaptcha({required BuildContext context, required CaptchaParams params}) → Future<String?>
Shows the captcha widget in the chosen mode.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Properties

enableModalDrag ↔ bool?
Controls whether the modal bottom sheet can be dragged Defaults to true if not set.
getter/setter pair
getMaxResponsiveDialogWidth → double
Get the maximum width of the responsive dialog from the last constructed controller.
no setter
isModalDismissible ↔ bool?
Controls whether the modal bottom sheet can be dismissed
getter/setter pair
webViewController ↔ WebViewController?
Controller used for webview_flutter (mobile).
getter/setter pair