Skip to content

Button ​

An ElevatedButton-based action button with three built-in styles, an optional leading icon, and a color shorthand instead of hand-building a ButtonStyle.

View source on GitHub ↗

CLI ​

Install this component into your project:

button
$flutter_beautify add button

Variants ​

FBButton.solid() · FBButton.outline() · FBButton.link() — the plain FBButton(...) constructor forwards to .solid().

Key parameters ​

ParameterTypeDefault
onPressedVoidCallback?—
title / childString? / Widget?—
colorColor?ambient Theme.of(context).colorScheme.primary
leadingIcon?—
styleButtonStyle?— overrides the generated style

Usage ​

dart
import 'package:your_app/widgets/button.dart';

FBButton.solid(onPressed: save, title: 'Save');

Released under the MIT License.