Skip to Content
Forui 0.14.0 is released 🎉
DocumentationFormButton

Button

A button.

CLI

To generate and customize this style:

dart run forui style create button

Usage

FButton(...)

FButton( style: FButtonStyle(...), mainAxisSize: MainAxisSize.min, onPress: () {}, onSecondaryPress: () {}, onSecondaryLongPress: () {}, shortcuts: { SingleActivator(LogicalKeyboardKey.enter): ActivateIntent() }, actions: { ActivateIntent: CallbackAction<ActivateIntent>(onInvoke: (_) {}) }, child: const Text('Button'), );

FButton.raw(...)

FButton.raw( style: FButtonStyle(...), onPress: () {}, onSecondaryPress: () {}, onSecondaryLongPress: () {}, shortcuts: { SingleActivator(LogicalKeyboardKey.enter): ActivateIntent() }, actions: { ActivateIntent: CallbackAction<ActivateIntent>(onInvoke: (_) {}) }, child: const Text('Button'), );

Examples

Appearance

Primary

Secondary

Destructive

Outline

Ghost

Content

With Text and Icon

With Only Icon

With Circular Progress

Last updated on