tapUp method
tapUp records the end of a tap.
Implementation
tapUp(Offset tapStop, {Duration? tapDuration, DateTime? time}) {
if (!recording) {
return;
}
assert(tapDuration == null || time == null,
"At least one of tapDuration or time must be null.");
if (events.last.type != FlutsterTestEventType.tap) {
throw Exception("Trying to tap up while latest event is not a tap.");
}
Duration? duration;
if (tapDuration != null) {
duration = tapDuration;
} else {
duration = durationToLastEvent(time);
}
events.last.tapUp(tapStop, tapDuration: duration);
}