getRenderableImageBytes method

  1. @override
Uint8List? getRenderableImageBytes({
  1. Size? size,
  2. ImageFileFormat format = ImageFileFormat.png,
  3. SignpostImageRenderSettings? renderSettings,
  4. bool allowResize = false,
})
override

Get the image data as a Uint8List. Display the image on UI using the Image.memory constructor.

Parameters

  • IN size The image size as (width, height). By default the SdkSettings.getDefaultWidthHeightImageFormat.size is used
  • IN format The image format. By default it is PNG.
  • IN renderSettings The render settings to be used.
  • IN allowResize If false then the given size will be used to render the image. If true then the SDK might choose a suitable size based on the height of the size. By default it is false.

Returns

Implementation

@override
Uint8List? getRenderableImageBytes({
  Size? size,
  ImageFileFormat format = ImageFileFormat.png,
  SignpostImageRenderSettings? renderSettings,
  bool allowResize = false,
}) {
  return getRenderableImage(
    size: size,
    format: format,
    renderSettings: renderSettings,
    allowResize: allowResize,
  )?.bytes;
}