setWidth method

  1. @override
bool setWidth(
  1. double width
)
override

Method is used to specify the width of the polyline. width Width of the polyline in pixels. Returns true if the operation is successful, false otherwise.

Example:

// Set polyline width
bool widthSuccess = _polylineMapObject!.setWidth(3.0);
print("Set polyline width to 3.0 pixels: $widthSuccess");

Implementation

@override
bool setWidth(double width) {
    final _setWidthFfi = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction<
        Uint8 Function(Pointer<Void>, Float),
        int Function(Pointer<Void>, double)
      >('navigine_sdk_flutter_PolylineMapObject_setWidth__Width'));
    final __resultHandle = _setWidthFfi(this.ptr, width);
    final _result = (__resultHandle != 0);
    exception.checkCallResult();
    return _result;
}