diffElementTimeAndSeparateTime method Null safety

int diffElementTimeAndSeparateTime(
  1. int elementNrA,
  2. GpsTime timeB

Calculate the difference in time between the item in the position elementNrA and the timeB. See diffTime for explanations on how the difference is calculated and when it is positive, negative or zero.


int diffElementTimeAndSeparateTime(int elementNrA, GpsTime timeB) {
  final elem = this[elementNrA];
  return diffTime(
      startTimeA: elem.time, endTimeA: elem.endTime, timeB: timeB);