rememberAnimationControllerUnbounded method

AnimationController rememberAnimationControllerUnbounded({
  1. double value = 0.0,
  2. Duration? duration,
  3. Duration? reverseDuration,
  4. String? debugLabel,
  5. AnimationBehavior animationBehavior = AnimationBehavior.normal,
  6. FutureOr<void> onDispose(
    1. AnimationController
    )?,
  7. Object? key,
})

动画控制器

  • 任何参数发生变化就会产生新的

Implementation

AnimationController rememberAnimationControllerUnbounded({
  double value = 0.0,
  Duration? duration,
  Duration? reverseDuration,
  String? debugLabel,
  AnimationBehavior animationBehavior = AnimationBehavior.normal,
  FutureOr<void> Function(AnimationController)? onDispose,
  Object? key,
}) {
  return remember<AnimationController>(
    factory2: (l) => AnimationController.unbounded(
      value: value,
      duration: duration,
      reverseDuration: reverseDuration,
      debugLabel: debugLabel,
      animationBehavior: animationBehavior,
      vsync: l.tickerProvider,
    ),
    key: FlexibleKey('Unbounded', value, duration, reverseDuration,
        animationBehavior, key),
    onDispose: (c) {
      c.dispose();
      onDispose?.call(c);
    },
  );
}