advanceTime method Null safety

  1. @override
bool advanceTime(
  1. num time
)
override

This method is called by the Juggler with the time past since the last call.

Returns true as long as this Animatable is not completed; false if it is completed.

Implementation

@override
bool advanceTime(num time) {
  if (_isStarted && ratio > 0.0) {
    ratio = ratio - time / totalTime;
    // ignore: invariant_booleans
    if (ratio == 0.0) pause();
  }
  return true;
}