getRoadInfoImage method

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

Get road image.

Parameters

  • IN size the image size
  • IN format the image format
  • IN backgroundColor the image background color. Might not be visible for images that already have a default background image

Returns

  • RoadInfo Image associated with the road information.

Throws

  • An exception if it fails.

Implementation

Uint8List? getRoadInfoImage({
  final Size? size,
  final ImageFileFormat? format,
  final Color backgroundColor = Colors.transparent,
}) {
  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),
  );
}