getRoute method
Get the Route object present at index in the collection.
Parameters
index: zero-based index of the route in the collection.
Returns
- Route?: the route at the given index, or
nullwhen the index is invalid.
See also:
size— The number of routes in the collection.- getMapViewRoute — Obtain the map view wrapper for the route at the given index.
Implementation
Route? getRoute(final int index) {
final OperationResult resultString = objectMethod(
pointerId,
'MapViewRouteCollection',
'getRoute',
args: index,
dependencyId: mapPointerId,
);
final dynamic result = resultString['result'];
if (result['empty'] == true) {
return null;
}
return Route.init(result['oid']);
}