nextNextInstruction property
Instruction after the next one on the route.
Returns the RouteInstruction two steps ahead of the current navigation position. Returns null if unavailable (e.g., when the next instruction is the destination).
Returns
- (RouteInstruction?) Next-next route instruction, or null if not available.
See also:
- nextInstruction - Immediate next instruction.
- hasNextNextTurnInfo - Check if next-next turn info is available.
Implementation
RouteInstruction? get nextNextInstruction {
final OperationResult resultString = objectMethod(
pointerId,
'NavigationInstruction',
'getNextNextInstruction',
);
final GemError gemApiError = GemErrorExtension.fromCode(
resultString['gemApiError'],
);
if (gemApiError != GemError.success) {
return null;
}
return RouteInstruction.init(resultString['result']);
}