MacroMath UI
Foundations

Buttons

Primary button (orange gradient) and secondary (ghost).

App · Flutter · macromath_mobile

The MacroMath button has two variants: primary (orange gradient, for the main action) and ghost (outlined, for secondary actions).

Variants

SavePrimary
CancelGhost
SaveWith icon
SaveDisabled

Sizes

SmallSmall
MediumMedium
LargeLarge

Properties

PropertyTypeDefaultDescription
labelStringButton text.
onPressedVoidCallback?nullTap action.
variantMmButtonVariantprimaryprimary or ghost.
iconIconData?nullOptional leading icon.

Usage

// Primary — main action
MmButton(
  label: 'Save',
  icon: Icons.check_rounded,
  onPressed: () {},
);

// Secondary (ghost)
MmButton(
  label: 'Cancel',
  variant: MmButtonVariant.ghost,
  onPressed: () {},
);

Try it live in the WidgetbookFoundations › Button.

On this page