ArCaptchaController class

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

Constructors

ArCaptchaController.new({required String siteKey, String lang = 'en', String domain = 'localhost', String onErrorMessage = 'Something went wrong, try again!', int errorPrint = 0, double captchaHeight = 550, Color color = Colors.black, ThemeMode theme = ThemeMode.light, DataSize dataSize = DataSize.normal})
Constructor initializes required fields and builds the HTML section.

Properties

captchaHeight double
The height of the captcha widget container.
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
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
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, CaptchaType mode = CaptchaType.dialog, required dynamic onError(String error), required dynamic onSuccess(String token)}) 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
inAppController ↔ InAppWebViewController?
Controller used for flutter_inappwebview (web).
getter/setter pair
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