getLaneImage method
- Size? size,
- ImageFileFormat? format,
- LaneImageRenderSettings renderSettings = const LaneImageRenderSettings(),
- bool allowResize = false,
Lane configuration image for the current position.
Renders an image showing the available lanes and which lane(s) to use for the upcoming maneuver. Customizable via size, format, and rendering settings. Returns null if lane information is unavailable.
Parameters
size: (Size?) Desired image dimensions.format: (ImageFileFormat?) Image format (PNG, JPEG, etc.).renderSettings: (LaneImageRenderSettings) Rendering configuration. Defaults toconst LaneImageRenderSettings().allowResize: (bool) Allow SDK to adjust size for optimal rendering. Defaults tofalse.
Returns
- (Uint8List?) Lane image data, or null if not available.
See also:
- laneImg - Lane image object.
- LaneImageRenderSettings - Customize lane image rendering.
Implementation
Uint8List? getLaneImage({
final Size? size,
final ImageFileFormat? format,
final LaneImageRenderSettings renderSettings =
const LaneImageRenderSettings(),
final bool allowResize = false,
}) {
return GemKitPlatform.instance.callGetImage(
pointerId,
'NavigationInstructionGetLaneImage',
size?.width.toInt() ?? -1,
size?.height.toInt() ?? -1,
format?.id ?? -1,
arg: jsonEncode(renderSettings),
allowResize: allowResize,
);
}