head method
Returns the leading segment of the route up to advance meters.
advance distance along route (meters).
Returns route head segment.
Example:
// Get head of route (first 10 meters)
RoutePath? headPath = path.head(10.0);
if (headPath != null) {
print("Head path length: ${headPath.length} meters");
}
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;
}