previousInstruction property

RouteInstruction? get previousInstruction

Get the previous route instruction on the route.

Returns

  • The previous route instruction, if available, null otherwise

Implementation

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

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

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

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