SwitchStyle class

The style to be applied to Switch widget

Mixed in types
Implementers
Annotations

Constructors

SwitchStyle({Size? size, EdgeInsetsGeometry? margin, EdgeInsetsGeometry? padding, Color? trackBorderColor, double? trackBorderOpacity, int? trackBorderAlpha, double? trackBorderWidth, BorderRadiusGeometry? trackBorderRadius, Color? trackColor, double? trackOpacity, int? trackAlpha, double? trackHeight, ShapeBorder? thumbShape, Color? thumbColor, double? thumbOpacity, int? thumbAlpha, double? thumbInset, double? thumbSize, Color? thumbShadow, double? thumbElevation, Color? overlayColor, double? overlayOpacity, bool? overlayDisabled, double? overlayRadius})
Create a raw style of switch widget
const
SwitchStyle.from(SwitchStyle? other)
Create a switch's style from another style

Properties

hashCode int
The hash code for this object.
no setteroverride
margin EdgeInsetsGeometry?
Empty space to surround the outside clickable area.
final
overlayColor Color?
The overlay color when pressed, hovered over, or focused.
final
overlayDisabled bool?
Whether the overlay is disabled or not,
final
overlayOpacity double?
The overlay opacity when pressed, hovered over, or focused.
final
overlayRadius double?
The radius of the overlay.
final
padding EdgeInsetsGeometry?
Empty space to increase the clickable area.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size Size?
The size of the Switch.
final
thumbAlpha int?
final
thumbColor Color?
final
thumbElevation double?
final
thumbInset double?
final
thumbOpacity double?
final
thumbShadow Color?
final
thumbShape ShapeBorder?
final
thumbSize double?
final
trackAlpha int?
final
trackBorderAlpha int?
final
trackBorderColor Color?
final
trackBorderOpacity double?
final
trackBorderRadius BorderRadiusGeometry?
final
trackBorderWidth double?
final
trackColor Color?
final
trackHeight double?
final
trackOpacity double?
final

Methods

copyWith({Size? size, EdgeInsetsGeometry? margin, EdgeInsetsGeometry? padding, Color? trackBorderColor, double? trackBorderOpacity, int? trackBorderAlpha, double? trackBorderWidth, BorderRadiusGeometry? trackBorderRadius, Color? trackColor, double? trackOpacity, int? trackAlpha, double? trackHeight, ShapeBorder? thumbShape, Color? thumbColor, double? thumbOpacity, int? thumbAlpha, double? thumbInset, double? thumbSize, Color? thumbShadow, double? thumbElevation, Color? overlayColor, double? overlayOpacity, bool? overlayDisabled, double? overlayRadius, bool? mergeResolved, SwitchStyle? indeterminateStyle, SwitchStyle? selectedStyle, SwitchStyle? focusedStyle, SwitchStyle? hoveredStyle, SwitchStyle? pressedStyle, SwitchStyle? disabledStyle}) SwitchStyle
Creates a copy of this SwitchStyle but with the given fields replaced with the new values.
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
override
merge(SwitchStyle? other) SwitchStyle
Creates a copy of this SwitchStyle but with the given fields replaced with the new values.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toMap() Map<String, dynamic>
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringShort() String
A brief description of this object, usually just the runtimeType and the hashCode.
inherited

Operators

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

Static Methods

lerp(SwitchStyle? a, SwitchStyle? b, double t) SwitchStyle?
Linearly interpolate between two SwitchStyle objects.

Constants

disabledThumbAlpha → const int
disabledTrackAlpha → const int
disabledTrackBorderAlpha → const int