UIButtonTheme class

Button sizing tokens for kit buttons.

Centralizes the per-variant heights and corner radii used by UIStyledButtonStyle so host apps can restyle every button by overriding a single theme extension instead of editing hardcoded values. Also exported under the alias UIButtonMetrics.

Inheritance

Constructors

UIButtonTheme({double borderRadius = 12, double height = 48, double horizontalPadding = 20, double primaryHeight = 61, double primaryRadius = 5, double outlinedHeight = 61, double outlinedRadius = 5, double elevatedHeight = 56, double elevatedRadius = 8, double textHeight = 44, double textRadius = 8})
const

Properties

borderRadius double
final
elevatedHeight double
Height for UIStyledButtonStyle.elevated.
final
elevatedRadius double
Corner radius for UIStyledButtonStyle.elevated.
final
hashCode int
The hash code for this object.
no setterinherited
height double
final
horizontalPadding double
final
outlinedHeight double
Height for UIStyledButtonStyle.outlined.
final
outlinedRadius double
Corner radius for UIStyledButtonStyle.outlined.
final
primaryHeight double
Height for UIStyledButtonStyle.primary.
final
primaryRadius double
Corner radius for UIStyledButtonStyle.primary.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
textHeight double
Height for UIStyledButtonStyle.text.
final
textRadius double
Corner radius for UIStyledButtonStyle.text.
final
type Object
The extension's type.
no setterinherited

Methods

copyWith({double? borderRadius, double? height, double? horizontalPadding, double? primaryHeight, double? primaryRadius, double? outlinedHeight, double? outlinedRadius, double? elevatedHeight, double? elevatedRadius, double? textHeight, double? textRadius}) UIButtonTheme
Creates a copy of this theme extension with the given fields replaced by the non-null parameter values.
override
lerp(covariant ThemeExtension<UIButtonTheme>? other, double t) UIButtonTheme
Linearly interpolate with another ThemeExtension object.
override
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

Constants

standard → const UIButtonTheme