ButtonStyle class
How a button looks: each property comes from the button's own style, then ButtonTheme, then the defaults, as on a Material button.
- Annotations
Constructors
-
ButtonStyle({WidgetStateProperty<
Color?> ? foregroundColor, WidgetStateProperty<Color?> ? backgroundColor, WidgetStateProperty<Color?> ? overlayColor, TextStyle? textStyle, WidgetStateProperty<BorderSide?> ? side, OutlinedBorder? shape, EdgeInsetsGeometry? padding, Size? minimumSize, Size? fixedSize, Size? maximumSize, double? iconSize, VisualDensity? visualDensity, TapTargetSize? tapTargetSize, ButtonLayerBuilder? backgroundBuilder, PressLook? pressLook, bool? ringStandsOff}) -
const
- ButtonStyle.from({Color? foregroundColor, Color? disabledForegroundColor, Color? backgroundColor, Color? disabledBackgroundColor, TextStyle? textStyle, OutlinedBorder? shape, EdgeInsetsGeometry? padding, Size? minimumSize, Size? fixedSize, Size? maximumSize, double? iconSize, VisualDensity? visualDensity, TapTargetSize? tapTargetSize, ButtonLayerBuilder? backgroundBuilder, PressLook? pressLook, bool? ringStandsOff})
-
Leaves an unset disabled color to the theme and the defaults.
factory
Properties
- backgroundBuilder → ButtonLayerBuilder?
-
final
-
backgroundColor
→ WidgetStateProperty<
Color?> ? -
final
- fixedSize → Size?
-
final
-
foregroundColor
→ WidgetStateProperty<
Color?> ? -
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- iconSize → double?
-
final
- maximumSize → Size?
-
final
- minimumSize → Size?
-
final
-
overlayColor
→ WidgetStateProperty<
Color?> ? -
Laid over the background; a hover it resolves replaces the surface's.
final
- padding → EdgeInsetsGeometry?
-
final
- pressLook → PressLook?
-
final
- ringStandsOff → bool?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shape → OutlinedBorder?
-
final
-
side
→ WidgetStateProperty<
BorderSide?> ? -
final
- tapTargetSize → TapTargetSize?
-
final
- textStyle → TextStyle?
-
Takes foregroundColor for its color.
final
- visualDensity → VisualDensity?
-
final
Methods
-
merge(
ButtonStyle? other) → ButtonStyle -
This style, taking from
otherwhat it leaves unset. -
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