CaptchaController class
A controller class to manage CAPTCHA generation, validation, and state.
This class is independent of any state management solution like GetX, making it reusable across different architectures.
Constructors
Properties
-
captchaChars
↔ List<
CaptchaChar> -
The list of styled characters for rendering.
getter/setter pair
-
captchaLines
↔ List<
CaptchaLine> -
The list of noise lines to render.
getter/setter pair
- captchaText ↔ String
-
Current CAPTCHA text value.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
refreshCaptcha(
{int length = 5}) → void - Refreshes and regenerates the CAPTCHA text, characters, and noise lines.
-
toString(
) → String -
A string representation of this object.
inherited
-
validateCaptcha(
String input) → bool - Validates the user input against the current CAPTCHA.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited