MihrButtonDefaults class

Single source of truth for button styles.

Contains two categories:

StructuralbaseStyle provides shape, size, padding, splash, animation, and cursor. No colors. This feeds both Mihr buttons and Material button themes.

ColorprimaryColors, secondaryColors, etc. provide backgroundColor, foregroundColor, side, and elevation using semantic tokens. Mihr buttons merge baseStyle + colorStyle. Material buttons use only baseStyle and get colors from ColorScheme.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

baseStyle({required MihrButtonSize size, OutlinedBorder? shape, bool isSquare = false}) ButtonStyle
Structural-only ButtonStyle for a regular (non-link) button.
destructiveLinkColors({required ForegroundColors fg}) ButtonStyle
Destructive link — text-only with error color.
destructivePrimaryColors({required BackgroundColors bg, required ForegroundColors fg}) ButtonStyle
Destructive primary — solid error fill.
destructiveSecondaryColors({required BackgroundColors bg, required ForegroundColors fg, required BorderColors border}) ButtonStyle
Destructive secondary — outlined with error border.
destructiveSoftPrimaryColors({required BackgroundColors bg, required ForegroundColors fg, required UtilityScale errorScale}) ButtonStyle
Destructive soft primary — tinted error bg with error text.
destructiveTertiaryColors({required BackgroundColors bg, required ForegroundColors fg}) ButtonStyle
Destructive tertiary — ghost with error text.
linkBaseStyle({required MihrButtonSize size, required Color hoverDecorationColor, OutlinedBorder? shape}) ButtonStyle
Structural style for link-style buttons (no padding, underline on hover).
linkBrandColors({required ForegroundColors fg}) ButtonStyle
Link button colors — brand-colored text, no background.
linkGrayColors({required ForegroundColors fg}) ButtonStyle
Link button colors — gray text variant.
primaryColors({required BackgroundColors bg, required ForegroundColors fg}) ButtonStyle
Primary button colors — solid brand fill.
secondaryColors({required BackgroundColors bg, required ForegroundColors fg, required BorderColors border}) ButtonStyle
Secondary button colors — outlined with gray border.
softPrimaryColors({required BackgroundColors bg, required ForegroundColors fg, required UtilityScale brandScale}) ButtonStyle
Soft primary — tinted brand bg with brand text, no border.
tertiaryColors({required BackgroundColors bg, required ForegroundColors fg}) ButtonStyle
Tertiary button colors — ghost, transparent background.