toOTRoute method

OTRoute? toOTRoute()

Converts this route to an OTRoute when applicable.

If this Route represents an over-track route, returns an OTRoute instance that exposes OT-specific APIs. Otherwise returns null.

Returns

  • An OTRoute when this route is an OT route, or null if it is not.

Also see:

  • isOTRoute - Check whether this route is an OT route.

Implementation

OTRoute? toOTRoute() {
  final OperationResult resultString = objectMethod(
    super.pointerId,
    'Route',
    'toOTRoute',
  );

  if (resultString['result'] == -1) {
    return null;
  }
  return OTRoute.init(resultString['result']);
}