getImage method
- Size? size,
- ImageFileFormat? format,
- SignpostImageRenderSettings renderSettings = const SignpostImageRenderSettings(),
- bool allowResize = false,
Rendered image bytes for this signpost.
Returns a byte array containing the rendered image produced using the provided size, format and
renderSettings. The value may be null if the signpost could not be rendered with the requested parameters.
Parameters
size: Optional desired image size. When omitted the SDK default size is used.format: Optional image file format. When omitted an appropriate default (PNG) is used.renderSettings: Rendering options to control border, corner rounding and maximum rows.allowResize: Whentruethe SDK may choose a suitable size based on the provided height; otherwise the requested size is used as-is.
Returns
Uint8List?: the image bytes when available, otherwisenull.
See also:
- SignpostImg — image helpers for signpost rendering.
Implementation
Uint8List? getImage({
final Size? size,
final ImageFileFormat? format,
final SignpostImageRenderSettings renderSettings =
const SignpostImageRenderSettings(),
final bool allowResize = false,
}) {
return GemKitPlatform.instance.callGetImage(
pointerId,
'SignPostDetailsGetImage',
size?.width.toInt() ?? -1,
size?.height.toInt() ?? -1,
format?.id ?? -1,
arg: jsonEncode(renderSettings),
allowResize: allowResize,
);
}