getRoadInfoImage method

Uint8List? getRoadInfoImage({
  1. Size? size,
  2. ImageFileFormat? format,
  3. Color backgroundColor = Colors.transparent,
  4. bool allowResize = false,
})

Retrieve a raster image representing the road information (e.g., shield or icon).

Parameters

  • size: Desired image dimensions. When null a default size is used.
  • format: Desired file format for the image, or null to use the default format.
  • backgroundColor: Background color to apply when rendering images that support background fill.
  • allowResize: When true, the platform may return an image resized to better match available assets.

Returns

  • Uint8List?: raw image bytes for the road info, or null when unavailable.

See also:

Implementation

Uint8List? getRoadInfoImage({
  final Size? size,
  final ImageFileFormat? format,
  final Color backgroundColor = Colors.transparent,
  final bool allowResize = false,
}) {
  final Rgba bkColor = backgroundColor.toRgba();
  return GemKitPlatform.instance.callGetImage(
    pointerId,
    'RouteInstructionGetRoadInfoImage',
    size?.width.toInt() ?? -1,
    size?.height.toInt() ?? -1,
    format?.id ?? -1,
    arg: jsonEncode(bkColor),
    allowResize: allowResize,
  );
}