ButtonSize class
Defines the relative size scaling for button components.
ButtonSize controls the overall scale of buttons, affecting text size, icon size, and proportional padding. The scaling factor is applied to all dimensional properties to maintain visual consistency.
Example:
Button.primary(
style: ButtonStyle.primary().copyWith(size: ButtonSize.large),
child: Text('Large Button'),
);
Constructors
- ButtonSize.new(double scale)
-
Creates a ButtonSize with the specified scaling factor.
const
Properties
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
Constants
- large → const ButtonSize
- Large button size (scale: 2.0).
- normal → const ButtonSize
- Standard button size (scale: 1.0).
- small → const ButtonSize
- Small button size (scale: 0.75).
- xLarge → const ButtonSize
- Extra large button size (scale: 3.0).
- xSmall → const ButtonSize
- Extra small button size (scale: 0.5).