getRenderableImageBytes method
- Size? size,
- ImageFileFormat format = ImageFileFormat.png,
- LaneImageRenderSettings? renderSettings,
- 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 thesize
. By default it is false.
Returns
- The image as a RenderableImg if the image isValid, null otherwise.
Implementation
@override
Uint8List? getRenderableImageBytes({
Size? size,
ImageFileFormat format = ImageFileFormat.png,
LaneImageRenderSettings? renderSettings,
bool allowResize = false,
}) {
return getRenderableImage(
size: size,
format: format,
renderSettings: renderSettings,
allowResize: allowResize,
)?.bytes;
}