Form

OTP Field

A one-time password input field for verification codes.

1@override
2Widget build(BuildContext _) => FOtpField();
3

CLI

To generate a specific style for customization:

dart run forui style create otp-field

Usage

FOtpField(...)

1FOtpField(
2 style: const .context(),
3 enabled: true,
4)

Examples

With Divider

1@override
2Widget build(BuildContext _) => FOtpField(
3 control: const .managed(
4 children: [
5 FOtpItem(),
6 FOtpItem(),
7 FOtpItem(),
8 FOtpDivider(),
9 FOtpItem(),
10 FOtpItem(),
11 FOtpItem(),
12 ],
13 ),
14);
15

No Filter

1@override
2Widget build(BuildContext _) => FOtpField(
3 inputFormatters: const [],
4);
5

On this page