getImageById static method
- required int id,
- Size? size,
- ImageFileFormat? format,
Returns the raw image bytes for the given image id.
Parameters
id: image identifier.size: optional desired image Size. If omitted the SDK default is used.format: optional ImageFileFormat. If omitted the SDK default is used.
Returns
- Uint8List?: the image bytes, or
nullwhen no image exists forid.
Also see:
- SdkSettings.setDefaultWidthHeightImageFormat - Set the SDK default size and format.
- SdkSettings.getImgById - Get an Img wrapper for the image.
Implementation
static Uint8List? getImageById({
required int id,
Size? size,
ImageFileFormat? format,
}) {
return GemKitPlatform.instance.callGetImage(
id,
'SdkSettingsgetImageById',
size?.width.toInt() ?? -1,
size?.height.toInt() ?? -1,
format?.id ?? -1,
imageId: id,
);
}