OtpThemeData class

Comprehensive theme configuration for all OTP widgets and verification views in the package.

Constructors

OtpThemeData({Color? cardBackgroundColor, Color? boxBackgroundColor, Color? defaultBorderColor, Color? activeBorderColor, Color? focusedBorderColor, Color? primaryColor, Color? glowColor, Color? errorColor, Color? successColor, Color? headingTextColor, Color? subtitleTextColor, Color? bodyTextColor, Color? hintTextColor, TextStyle? titleStyle, TextStyle? subtitleStyle, TextStyle? bodyStyle, TextStyle? successTitleStyle, TextStyle? successSubtitleStyle, TextStyle? digitTextStyle, TextStyle? hintTextStyle, TextStyle? resendTextStyle, TextStyle? verifyingLabelStyle, TextStyle? verifiedLabelStyle, TextStyle? actionButtonStyle, TextStyle? resendLabelStyle, TextStyle? continueLabelStyle, double? boxHeight, double? spacing, double? borderRadius})
Creates an OtpThemeData.
const

Properties

actionButtonStyle TextStyle?
Text style for action buttons (e.g. Continue button).
final
activeBorderColor Color?
Active border color when an OTP box is focused.
final
bodyStyle TextStyle?
Text style for body text.
final
bodyTextColor Color?
Color of the body text.
final
borderRadius double?
Border radius of OTP boxes and cards.
final
boxBackgroundColor Color?
Background fill color of individual OTP boxes.
final
boxHeight double?
Height of OTP input boxes.
final
cardBackgroundColor Color?
Background color of the container/card in verification views.
final
continueLabelStyle TextStyle?
Text style for the continue / proceed button label. Falls back to actionButtonStyle when null.
final
defaultBorderColor Color?
Default/inactive border color for OTP boxes.
final
digitTextStyle TextStyle?
Text style for entered digits inside OTP boxes.
final
errorColor Color?
Error color for error state highlights and borders.
final
focusedBorderColor Color?
Focused border color when an OTP box is being edited.
final
glowColor Color?
Accent glow color for electric/lightning/sigil effects.
final
hashCode int
The hash code for this object.
no setterinherited
headingTextColor Color?
Color of the main heading text.
final
hintTextColor Color?
Color of hint/helper text.
final
hintTextStyle TextStyle?
Text style for hint/helper copy (e.g. "Didn't receive code?").
final
primaryColor Color?
Primary color for highlights, active elements, resend actions, buttons.
final
resendLabelStyle TextStyle?
Text style for the resend label (tap-to-resend button). Falls back to resendTextStyle when null.
final
resendTextStyle TextStyle?
Text style for the resend button label.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
spacing double?
Spacing between OTP boxes.
final
subtitleStyle TextStyle?
Text style for the subtitle text.
final
subtitleTextColor Color?
Color of the subtitle text.
final
successColor Color?
Success color for success checkmarks, verified states, green glow.
final
successSubtitleStyle TextStyle?
Text style for success subtitle text.
final
successTitleStyle TextStyle?
Text style for success title text.
final
titleStyle TextStyle?
Text style for the primary heading / title text.
final
verifiedLabelStyle TextStyle?
Text style for verified/completed status label.
final
verifyingLabelStyle TextStyle?
Text style for verifying status label.
final

Methods

copyWith({Color? cardBackgroundColor, Color? boxBackgroundColor, Color? defaultBorderColor, Color? activeBorderColor, Color? focusedBorderColor, Color? primaryColor, Color? glowColor, Color? errorColor, Color? successColor, Color? headingTextColor, Color? subtitleTextColor, Color? bodyTextColor, Color? hintTextColor, TextStyle? titleStyle, TextStyle? subtitleStyle, TextStyle? bodyStyle, TextStyle? successTitleStyle, TextStyle? successSubtitleStyle, TextStyle? digitTextStyle, TextStyle? hintTextStyle, TextStyle? resendTextStyle, TextStyle? verifyingLabelStyle, TextStyle? verifiedLabelStyle, TextStyle? actionButtonStyle, TextStyle? resendLabelStyle, TextStyle? continueLabelStyle, double? boxHeight, double? spacing, double? borderRadius}) OtpThemeData
Creates a copy of this theme data with the given fields replaced with new values.
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 Methods

of(BuildContext context) OtpThemeData?
Retrieve the closest OtpThemeData instance from the build context.