Import
import 'package:flutter/widgets.dart';
import 'package:fluttyui/fluttyui.dart' as ui;API Reference
The declarations below match the current FluttyUI source. Types are shown without the optional ui. import prefix.
OTP
const OTP({
super.key,
this.size,
this.length = 6,
this.controller,
this.value,
this.autofillHints = const [AutofillHints.oneTimeCode],
this.autofocus = false,
this.onChanged,
this.onCompleted,
this.enabled = true,
this.obscureText = false,
this.boxSize,
this.boxWidth,
this.boxHeight,
this.spacing,
this.borderRadius,
this.backgroundColor,
this.borderColor,
this.focusedBorderColor,
this.textColor,
this.fontSize,
this.separator = '-',
this.separatorAfter = 3,
});| Parameter | Type | Required | Default |
|---|---|---|---|
key | Key? | No | null |
size | ComponentSize? | No | null |
length | int | No | 6 |
controller | TextEditingController? | No | null |
value | String? | No | null |
autofillHints | Iterable<String>? | No | const [AutofillHints.oneTimeCode] |
autofocus | bool | No | false |
onChanged | ValueChanged<String>? | No | null |
onCompleted | ValueChanged<String>? | No | null |
enabled | bool | No | true |
obscureText | bool | No | false |
boxSize | double? | No | null |
boxWidth | double? | No | null |
boxHeight | double? | No | null |
spacing | double? | No | null |
borderRadius | double? | No | null |
backgroundColor | Color? | No | null |
borderColor | Color? | No | null |
focusedBorderColor | Color? | No | null |
textColor | Color? | No | null |
fontSize | double? | No | null |
separator | String? | No | '-' |
separatorAfter | int | No | 3 |
Application Setup
Place components under FluttyApp to provide theme, navigation, localization, and overlay defaults. Use theme tokens for shared appearance settings.
Source
lib/src/widgets/forms/input_otp/otp.dart
This reference is generated from the OTP declaration in the FluttyUI core checkout. The component catalog lists the other available building blocks.

