DrivenSwitcherThemeData class

Defines the visual properties of DrivenSwitcher.

Descendant widgets obtain the current DrivenSwitcherThemeData object using DrivenSwitcherTheme.of(context). Instances of DrivenSwitcherThemeData can be customized with DrivenSwitcherThemeData.copyWith or DrivenSwitcherThemeData.merge.

Inheritance
Mixed-in types

Constructors

DrivenSwitcherThemeData({Duration? duration, Duration? reverseDuration, Curve? switchInCurve, Curve? switchOutCurve, AnimatedSwitcherTransitionBuilder? transitionBuilder, AnimatedSwitcherLayoutBuilder? layoutBuilder, bool maintainKey = true})
Creates a theme data that can be used for DrivenSwitcherTheme.
const
DrivenSwitcherThemeData.from([DrivenSwitcherThemeData? other, DrivenSwitcherThemeData fallback = const DrivenSwitcherThemeData()])
Creates a DrivenSwitcherThemeData from another one that probably null.

Properties

duration Duration?
The duration of the switch animation.
final
hashCode int
The hash code for this object.
no setteroverride
layoutBuilder AnimatedSwitcherLayoutBuilder?
The builder function used to customize the layout of the AnimatedSwitcher.
final
maintainKey bool
Whether the switcher's stroke is rounded.
final
reverseDuration Duration?
The duration of the reverse switch animation.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
switchInCurve Curve?
The curve used for the switch-in animation.
final
switchOutCurve Curve?
The curve used for the switch-out animation.
final
transitionBuilder AnimatedSwitcherTransitionBuilder?
The builder function used to customize the switch animation.
final
type Object
The extension's type.
no setterinherited

Methods

copyWith({Duration? duration, Duration? reverseDuration, Curve? switchInCurve, Curve? switchOutCurve, AnimatedSwitcherTransitionBuilder? transitionBuilder, AnimatedSwitcherLayoutBuilder? layoutBuilder, bool? maintainKey}) DrivenSwitcherThemeData
Creates a copy of this DrivenSwitcherThemeData 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 DrivenSwitcherThemeData? other, double t) DrivenSwitcherThemeData
Linearly interpolate with another ThemeExtension object.
override
merge(DrivenSwitcherThemeData? other) DrivenSwitcherThemeData
Creates a copy of this DrivenSwitcherThemeData 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

defaultLayoutBuilder → const Widget Function(Widget? currentChild, List<Widget> previousChildren)
The default layout builder for the DrivenSwitcher.
defaultTransitionBuilder → const Widget Function(Widget child, Animation<double> animation)
The default transition builder for the DrivenSwitcher.