isDone method

  1. @override
bool isDone(
  1. double t
)
override

True when the simulation has effectively come to rest.

Implementation

@override
bool isDone(double t) {
  if (endPosition >= double.maxFinite) return false;
  return acceleration >= 0
      ? position(t) >= endPosition
      : position(t) <= endPosition;
}