InjectedAnimationImp constructor

InjectedAnimationImp({
  1. Duration duration = const Duration(milliseconds: 500),
  2. Duration? reverseDuration,
  3. Curve curve = Curves.linear,
  4. Curve? reverseCurve,
  5. double? initialValue,
  6. double upperBound = 1.0,
  7. double lowerBound = 0.0,
  8. AnimationBehavior animationBehavior = AnimationBehavior.normal,
  9. int? repeats,
  10. bool shouldReverseRepeats = false,
  11. bool shouldAutoStart = false,
  12. void onInitialized(
    1. InjectedAnimation
    )?,
  13. void endAnimationListener()?,
})

InjectedAnimation implementation

Implementation

InjectedAnimationImp({
  Duration duration = const Duration(milliseconds: 500),
  Duration? reverseDuration,
  Curve curve = Curves.linear,
  Curve? reverseCurve,
  this.initialValue,
  this.upperBound = 1.0,
  this.lowerBound = 0.0,
  this.animationBehavior = AnimationBehavior.normal,
  int? repeats,
  bool shouldReverseRepeats = false,
  this.shouldAutoStart = false,
  this.onInitialized,
  this.endAnimationListener,
}) : super(
        creator: () => 0.0,
        initialState: 0.0,
        autoDisposeWhenNotUsed: true,
        stateInterceptorGlobal: null,
      ) {
  _resetDefaultState = () {
    this.duration = duration;
    this.reverseDuration = reverseDuration;
    this.curve = curve;
    this.reverseCurve = reverseCurve;
    this.repeats = repeats;
    this.shouldReverseRepeats = shouldReverseRepeats;
    animationEndFuture = null;
    isAnimating = false;
    skipDismissStatus = false;
    repeatCount = null;
    _didUpdateWidgetListeners.clear();
    _resetAnimationListeners.clear();
    _controller = null;
    //
    _curvedAnimation = null;
    _reverseCurvedAnimation = null;
  };
  _resetDefaultState();
}