WidgetTransition<T> constructor

const WidgetTransition<T>({
  1. Key? key,
  2. Duration duration = const Duration(milliseconds: 750),
  3. required T value,
  4. required Widget builder(
    1. BuildContext,
    2. T
    ),
  5. bool equals(
    1. T,
    2. T
    ) = _defaultEquals,
  6. bool highlightTransition(
    1. T,
    2. T
    ) = _defaultHighlightTransition,
  7. double highlightScale = 1.2,
  8. Duration? highlightDuration,
  9. Curve curve = Curves.easeIn,
  10. Curve highlightingCurve = Curves.ease,
  11. Curve? highlightingReverseCurve,
  12. required Widget transitionBuilder(
    1. BuildContext context,
    2. Widget? previousChild,
    3. Widget child,
    4. T? previous,
    5. T current,
    6. Animation<double> animation,
    ),
})

The default constructor of WidgetTransition.

If you want to disable the size animation for performance reasons, set sizeDuration to Duration.zero.

Implementation

const WidgetTransition({
  Key? key,
  this.duration = const Duration(milliseconds: 750),
  required this.value,
  required this.builder,
  this.equals = _defaultEquals,
  this.highlightTransition = _defaultHighlightTransition,
  this.highlightScale = 1.2,
  this.highlightDuration,
  this.curve = Curves.easeIn,
  this.highlightingCurve = Curves.ease,
  this.highlightingReverseCurve,
  required this.transitionBuilder,
}) : super(key: key);