AnimatedSwitcherPlus.translationLeft constructor

AnimatedSwitcherPlus.translationLeft({
  1. required Duration duration,
  2. double offset = 1.0,
  3. Duration? reverseDuration,
  4. Curve? switchInCurve,
  5. Curve? switchOutCurve,
  6. AnimatedSwitcherLayoutBuilder? layoutBuilder,
  7. Widget? child,
  8. bool enableFade = true,
  9. Key? key,
})

Animated Switcher with translation transition toward left

Implementation

AnimatedSwitcherPlus.translationLeft({
  required Duration duration,
  double offset = 1.0,
  Duration? reverseDuration,
  Curve? switchInCurve,
  Curve? switchOutCurve,
  AnimatedSwitcherLayoutBuilder? layoutBuilder,
  Widget? child,
  bool enableFade = true,
  Key? key,
}) : super(
        duration: duration,
        reverseDuration: reverseDuration,
        switchInCurve: switchInCurve ?? _translationCurveIn,
        switchOutCurve: switchOutCurve ?? _translationCurveOut,
        layoutBuilder: layoutBuilder ?? AnimatedSwitcher.defaultLayoutBuilder,
        transitionBuilder:
            translationTransitionBuilder(Offset(offset, 0), enableFade),
        child: child,
        key: key,
      );