Flutter Design Systems Galleries

Button

A button runs an action on the current screen. Give it a verb that tells the reader what will happen. Use a link to take someone to another destination.

About this look Stint app Appliance gallery

Save a draft

Save the draft, then reset the example to try the action again.

Flutter preview Open preview
label
Legend printed on the key.
onPressed
Runs the action. Pass null to disable it.
icon
Adds a glyph beside the legend.
style
Overrides the key face.
isDestructiveAction
Applies the destructive action treatment.
focusNode
Supplies the FocusNode owned by the caller.
autofocus
Requests keyboard focus when the control first appears.

Shared behaviour

  • Keyboard and focus. Tab moves focus to an enabled button. Enter or Space activates it. A disabled action leaves the focus order.
  • Screen readers. The button exposes its label, role and enabled state. The visible label changes when the draft is saved.
  • Direction and type. The actions follow reading order in RTL. At larger text sizes they can wrap onto separate lines.
Read the ui_core contract