getImage method

Uint8List? getImage({
  1. Size? size,
  2. ImageFileFormat? format,
})

Retrieves an image representing the traffic event.

The SDK may return an image useful for UI display. When null no image is available.

Parameters

  • size: Desired image size. When omitted the SDK default is used.
  • format: Preferred image file format.

Returns

  • Uint8List?: raw image bytes or null when no image is available.

Also see:

  • img — image wrapper useful for SDK rendering APIs.

Implementation

Uint8List? getImage({final Size? size, final ImageFileFormat? format}) {
  return GemKitPlatform.instance.callGetImage(
    pointerId,
    'TrafficEvent',
    size?.width.toInt() ?? -1,
    size?.height.toInt() ?? -1,
    format?.id ?? -1,
  );
}