Flutter Design Systems Galleries

One-time code

A one-time code field collects a short code as one value, even when it draws separate places for each digit. Use it when the code length is known in advance.

About this look Stint app Appliance gallery

Enter a code

Enter or paste 1234. The feedback changes when all four places are filled. Delete one digit to return to the partial state.

Flutter preview Open preview
semanticLabel
Names the single code entry.
length
Number of digits expected.
onChanged
Receives the whole value after each edit.

Shared behaviour

  • Keyboard and focus. Tab to the code input. Type the digits together and use Backspace to edit.
  • Screen readers. The input is named “Verification code”. Read the status beneath it to check how many digits are present.
  • Direction and type. The code is a sequence with a fixed order. Compare its display in both directions, especially after enlarging the text.
Read the ui_core contract