nextInstruction property

RouteInstruction? get nextInstruction

Get the next route instruction on the route.

Returns

  • The next route instruction if available, null otherwise

Implementation

RouteInstruction? get nextInstruction {
  final OperationResult resultString =
      objectMethod(pointerId, 'NavigationInstruction', 'getNextInstruction');

  final GemError gemApiError = GemErrorExtension.fromCode(
    resultString['gemApiError'],
  );

  if (gemApiError != GemError.success) {
    return null;
  }

  return RouteInstruction.init(resultString['result']);
}