head method
@brief Returns the leading segment of the route.
Returns the portion of the route from the start up to the specified advance distance along the route. If advance exceeds the total route length, the entire route is returned.
@param advance Distance along the route (in meters). @return The covered (passed) segment of the route (from start to advance), or nil if the segment is empty.
Dart code snippet: @snippet route_manager_example.dart dart_RoutePath_head
Implementation
@override
RoutePath head(double advance) {
final _headFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction<
Pointer<Void> Function(Pointer<Void>, Float),
Pointer<Void> Function(Pointer<Void>, double)
>('navigine_sdk_flutter_RoutePath_head__Advance'));
final _advanceHandle = navigine_sdk_flutter_double_ToFfi(advance);
final _handle = this.handle;
final __resultHandle = _headFfi(_handle, _advanceHandle);
navigine_sdk_flutter_double_ReleaseFfiHandle(_advanceHandle);
final _result = navigine_sdk_flutter_RoutePath_FromFfi(__resultHandle);
navigine_sdk_flutter_RoutePath_ReleaseFfiHandle(__resultHandle);
return _result;
}