animated<T> method

RegistryEntry<AnimationController> animated<T>({
  1. Duration? duration,
  2. Duration? reverseDuration,
  3. AnimationBehavior? animationBehavior,
  4. String? debugLabel,
  5. double? lowerBound,
  6. double? upperBound,
  7. double? value,
})

Implementation

RegistryEntry<AnimationController> animated<T>({
  Duration? duration,
  Duration? reverseDuration,
  AnimationBehavior? animationBehavior,
  String? debugLabel,
  double? lowerBound,
  double? upperBound,
  double? value,
}) {
  return this.ticked(
    (context, vsync) {
      final result = AnimationController(
        duration: duration,
        animationBehavior: animationBehavior ?? AnimationBehavior.normal,
        debugLabel: debugLabel,
        lowerBound: lowerBound ?? 0.0,
        upperBound: upperBound ?? 1.0,
        reverseDuration: reverseDuration,
        value: value,
        vsync: vsync,
      );
      return DisposedValue(
        value: result,
        dispose: () => result.dispose(),
      );
    },
  );
}