useAnimationController method
AnimationController
useAnimationController({
- double? value,
- Duration? duration,
- Duration? reverseDuration,
- String? debugLabel,
- double lowerBound = 0.0,
- double upperBound = 1.0,
- AnimationBehavior animationBehavior = AnimationBehavior.normal,
- required TickerProvider vsync,
Creates and automatically disposes an AnimationController.
Implementation
AnimationController useAnimationController({
double? value,
Duration? duration,
Duration? reverseDuration,
String? debugLabel,
double lowerBound = 0.0,
double upperBound = 1.0,
AnimationBehavior animationBehavior = AnimationBehavior.normal,
required TickerProvider vsync,
}) {
final state = stateOf(
() => AnimationController(
value: value,
duration: duration,
reverseDuration: reverseDuration,
debugLabel: debugLabel,
lowerBound: lowerBound,
upperBound: upperBound,
animationBehavior: animationBehavior,
vsync: vsync,
),
onDispose: (e) => e.dispose(),
);
return state.value;
}