isDone method
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;
}