peakTime property
double?
get
peakTime
Time of flight peak (when velocity = 0) for upward throws. Returns null if the object never reverses direction.
Implementation
double? get peakTime {
if (acceleration == 0 || velocity0 == 0) return null;
final t = -velocity0 / acceleration;
return t > 0 ? t : null;
}