otpInputDecoration method
Decoration for the OTP input field.
Implementation
@override
InputDecoration otpInputDecoration({required String hint, String? label}) {
final base = super.otpInputDecoration(hint: hint, label: label);
final soft = theme.inputBorder.withValues(alpha: 0.35);
OutlineInputBorder border(Color c, [double w = 1]) => OutlineInputBorder(
borderSide: BorderSide(color: c, width: w),
borderRadius: BorderRadius.circular(inputRadius),
);
return base.copyWith(
fillColor: Color.alphaBlend(
theme.primary.withValues(alpha: 0.04),
theme.inputBackground,
),
border: border(soft),
enabledBorder: border(soft),
focusedBorder: border(theme.primary, 1.6),
);
}