tail method

  1. @override
RoutePath tail(
  1. double advance
)
override

@brief Returns the remaining segment of the route.

Returns the portion of the route starting from the specified advance distance to the end of the route. If advance is less than or equal to zero, the entire route is returned.

@param advance Distance along the route (in meters). @return The remaining segment of the route (from advance to end), or nil if the segment is empty.

Dart code snippet: @snippet route_manager_example.dart dart_RoutePath_tail

Implementation

@override
RoutePath tail(double advance) {
    final _tailFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction<
        Pointer<Void> Function(Pointer<Void>, Float),
        Pointer<Void> Function(Pointer<Void>, double)
      >('navigine_sdk_flutter_RoutePath_tail__Advance'));
    final _advanceHandle = navigine_sdk_flutter_double_ToFfi(advance);
    final _handle = this.handle;
    final __resultHandle = _tailFfi(_handle, _advanceHandle);
    navigine_sdk_flutter_double_ReleaseFfiHandle(_advanceHandle);
    final _result = navigine_sdk_flutter_RoutePath_FromFfi(__resultHandle);
    navigine_sdk_flutter_RoutePath_ReleaseFfiHandle(__resultHandle);
    return _result;
}