vsync static method

  1. @factory
GetVsyncDouble vsync({
  1. double? initialValue,
  2. Duration? duration,
  3. Duration? reverseDuration,
  4. AnimationBehavior? animationBehavior,
  5. String? debugLabel,
  6. double? lowerBound,
  7. double? upperBound,
  8. bool bounded = true,
})

Encapsulates an AnimationController.

Implementation

@factory
static GetVsyncDouble vsync({
  double? initialValue,
  Duration? duration,
  Duration? reverseDuration,
  AnimationBehavior? animationBehavior,
  String? debugLabel,
  double? lowerBound,
  double? upperBound,
  bool bounded = true,
}) {
  return GetVsyncDouble._(
    Vsync.build(
      (vsync) => _AnimationControllerStyled(
        vsync: vsync,
        value: initialValue,
        lowerBound: lowerBound ?? (bounded ? 0.0 : double.negativeInfinity),
        upperBound: upperBound ?? (bounded ? 1.0 : double.infinity),
        duration: duration,
        reverseDuration: reverseDuration,
        animationBehavior:
            animationBehavior ??
            (bounded ? AnimationBehavior.normal : AnimationBehavior.preserve),
        debugLabel: debugLabel,
      ),
    ),
  );
}