getRoadInfoImage method
Uint8List?
getRoadInfoImage({
- Size? size,
- ImageFileFormat? format,
- Color backgroundColor = Colors.transparent,
- bool allowResize = false,
Retrieve a raster image representing the road information (e.g., shield or icon).
Parameters
size: Desired image dimensions. Whennulla default size is used.format: Desired file format for the image, ornullto use the default format.backgroundColor: Background color to apply when rendering images that support background fill.allowResize: Whentrue, the platform may return an image resized to better match available assets.
Returns
Uint8List?: raw image bytes for the road info, ornullwhen unavailable.
See also:
- roadInfoImg - the road info image in a RoadInfoImg format.
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,
);
}