Button
A button.
Preview
CLI
To generate and customize this style:
dart run forui style create buttonUsage
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
Preview
Secondary
Preview
Destructive
Preview
Outline
Preview
Ghost
Preview
Content
With Text and Icon
Preview
With Only Icon
Preview
With Circular Progress
Preview
Last updated on