getAbstractGeometryImage method

Uint8List? getAbstractGeometryImage({
  1. Size? size,
  2. ImageFileFormat? format,
  3. AbstractGeometryImageRenderSettings renderSettings = const AbstractGeometryImageRenderSettings(),
})

Returns image bytes for the abstract geometry.

Generates an image representation of the abstractGeometry. The image may be customised using renderSettings to match your app colours (recommended for consistent theming).

Parameters

  • size: Optional desired image size. If omitted, the SDK default image size is used.
  • format: Optional image file format. Defaults to PNG when not set.
  • renderSettings: Optional AbstractGeometryImageRenderSettings instance that controls active/inactive colours and other rendering options.

Returns

  • Uint8List?: Raw image bytes for the requested image, or null if the image could not be generated. Callers are responsible for validating the image before displaying it.

Also see:

  • abstractGeometryImg — Renderable image wrapper for the abstract geometry.
  • AbstractGeometryImg — Class that provides metadata and access to renderable bytes.
  • abstractGeometryImageUid - Unique identifier for the abstract geometry image. Used to determine whether the image changed since the last instruction.

Implementation

Uint8List? getAbstractGeometryImage({
  final Size? size,
  final ImageFileFormat? format,
  final AbstractGeometryImageRenderSettings renderSettings =
      const AbstractGeometryImageRenderSettings(),
}) {
  return GemKitPlatform.instance.callGetImage(
    pointerId,
    'TurnDetailsGetAbstractGeometryImage',
    size?.width.toInt() ?? -1,
    size?.height.toInt() ?? -1,
    format?.id ?? -1,
    arg: jsonEncode(renderSettings),
  );
}