head method

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

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 __resultHandle = _headFfi(this.ptr, advance);
    final _result = RoutePath$Impl.fromNativePtr(__resultHandle);
    exception.checkCallResult();
    return _result;
}