rememberAnimationController method
AnimationController
rememberAnimationController({})
动画控制器
- 任何参数发生变化就会产生新的
Implementation
AnimationController rememberAnimationController({
double? value,
Duration? duration,
Duration? reverseDuration,
String? debugLabel,
double lowerBound = 0.0,
double upperBound = 1.0,
AnimationBehavior animationBehavior = AnimationBehavior.normal,
FutureOr<void> Function(AnimationController)? onDispose,
Object? key,
}) {
return remember<AnimationController>(
factory2: (l) => AnimationController(
value: value,
duration: duration,
reverseDuration: reverseDuration,
debugLabel: debugLabel,
lowerBound: lowerBound,
upperBound: upperBound,
animationBehavior: animationBehavior,
vsync: l.tickerProvider,
),
key: FlexibleKey(value, duration, reverseDuration, lowerBound, upperBound,
animationBehavior, key),
onDispose: (c) {
c.dispose();
onDispose?.call(c);
},
);
}