SwitchTileThemeData class
Defines the visual properties of SwitchTile.
Descendant widgets obtain the current SwitchTileThemeData object using
SwitchTheme.of(context)
. Instances of SwitchTileThemeData
can be customized with SwitchTileThemeData.copyWith or SwitchTileThemeData.merge.
- Inheritance
-
- Object
- ThemeExtension<
SwitchTileThemeData> - SwitchTileThemeData
- Mixed-in types
- Implementers
- Annotations
Constructors
- SwitchTileThemeData.new({required Curve curve, required Duration duration, required ControlAffinity controlAffinity, required SwitchStyle switchStyle, required ButtonStyle buttonStyle})
-
Creates a theme data that can be used for SwitchTileTheme.
const
- SwitchTileThemeData.defaults(BuildContext context)
-
A SwitchTileThemeData with default values.
factory
- SwitchTileThemeData.from([SwitchTileThemeData? other])
- Creates a SwitchTileThemeData from another one that probably null.
- SwitchTileThemeData.ios(BuildContext context)
-
A SwitchTileThemeData with ios default values.
factory
- SwitchTileThemeData.m2(BuildContext context)
-
A SwitchTileThemeData with material 2 default values.
factory
- SwitchTileThemeData.m3(BuildContext context)
-
A SwitchTileThemeData with material 3 default values.
factory
Properties
-
The ButtonStyle to be applied to the clickable area.
final
- controlAffinity → ControlAffinity
-
Where to place the control next to a label.
final
- curve → Curve
-
The curve to apply when animating the parameters of switch tile widget.
final
- duration → Duration
-
The duration over which to animate the parameters of switch tile widget.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- switchStyle → SwitchStyle
-
The SwitchStyle to be applied to the switch tile widget
final
- type → Object
-
The extension's type.
no setterinherited
Methods
-
copyWith(
{Curve? curve, Duration? duration, ControlAffinity? controlAffinity, SwitchStyle? switchStyle, ButtonStyle? buttonStyle}) → SwitchTileThemeData -
Creates a copy of this SwitchTileThemeData but with
the given fields replaced with the new values.
override
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
override
-
lerp(
covariant ThemeExtension< SwitchTileThemeData> ? other, double t) → SwitchTileThemeData -
Linearly interpolate with another ThemeExtension object.
override
-
merge(
SwitchTileThemeData? other) → SwitchTileThemeData - Creates a copy of this SwitchTileThemeData 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
Constants
- fallback → const SwitchTileThemeData
- A SwitchTileThemeData with some reasonable default values.