arrivalTime property

DateTime? get arrivalTime

Get arrival time

Returns

  • Arrival time of the route segment if available, null otherwise.

Throws

  • An exception if it fails.

Implementation

DateTime? get arrivalTime {
  final OperationResult resultString = objectMethod(
    _pointerId,
    'PTRouteSegment',
    'getArrivalTime',
  );

  final int val = resultString['result'];
  if (val < -8640000000000000 || val > 8640000000000000) {
    return null;
  }

  return DateTime.fromMillisecondsSinceEpoch(val, isUtc: true);
}