OTPSecurityConfig class

Security configuration for OTP/PIN input fields.

Security is OFF by default. Enable it globally or per-widget.

Example:

// Enable security globally
OTPSecurityConfig.enableSecurity();

// Or per-widget
OTPTextField(
  length: 6,
  enableSecurity: true,  // Override global setting
)

Constructors

OTPSecurityConfig()

Properties

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
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

enableSecurityLogging bool
Enable debug logging for security events.
getter/setter pair
enforceValidation bool
Whether to enforce validation. Defaults to false (security OFF).
getter/setter pair
lockoutDuration Duration
Lockout duration after max attempts
getter/setter pair
maxAttempts int
Maximum attempts before lockout (0 = no limit)
getter/setter pair
maxBorderRadius double
Maximum border radius
getter/setter pair
maxBorderWidth double
Maximum border width
getter/setter pair
maxFontSize double
Maximum font size for OTP digits
getter/setter pair
maxOTPLength int
Maximum allowed OTP/PIN length
getter/setter pair
maxPinSize double
Maximum pin box size
getter/setter pair
maxSpacing double
Maximum spacing between pins
getter/setter pair
minFontSize double
Minimum font size for OTP digits
getter/setter pair
minOTPLength int
Minimum allowed OTP/PIN length
getter/setter pair
minPinSize double
Minimum pin box size
getter/setter pair

Static Methods

disableSecurity() → void
Disable security validation globally.
enableSecurity() → void
Enable security validation globally.
resetToDefaults() → void
Reset all settings to defaults.