AnimatedSwitcherModifier constructor
const
AnimatedSwitcherModifier({
- Key? key,
- Key? modifierKey,
- Widget? child,
- required Duration duration,
- Duration? reverseDuration,
- Curve switchInCurve = Curves.linear,
- Curve switchOutCurve = Curves.linear,
- AnimatedSwitcherTransitionBuilder transitionBuilder = AnimatedSwitcher.defaultTransitionBuilder,
- AnimatedSwitcherLayoutBuilder layoutBuilder = AnimatedSwitcher.defaultLayoutBuilder,
Creates an AnimatedSwitcher.
The duration
, transitionBuilder
, layoutBuilder
, switchInCurve
, and
switchOutCurve
parameters must not be null.
Implementation
const AnimatedSwitcherModifier({
super.key,
super.modifierKey,
super.child,
required this.duration,
this.reverseDuration,
this.switchInCurve = Curves.linear,
this.switchOutCurve = Curves.linear,
this.transitionBuilder = AnimatedSwitcher.defaultTransitionBuilder,
this.layoutBuilder = AnimatedSwitcher.defaultLayoutBuilder,
}) : assert(duration != null),
assert(switchInCurve != null),
assert(switchOutCurve != null),
assert(transitionBuilder != null),
assert(layoutBuilder != null);