Skip to Content
Forui 0.17.0 is released 🎉

Button

A button.

CLI

To generate and customize this style:

dart run forui style create button

Usage

FButton(...)

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

FButton.raw(...)

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

Examples

Appearance

Primary

Secondary

Destructive

Outline

Ghost

Content

With Text and Icon

With Only Icon

With Circular Progress

Last updated on