toImage method
Converts the signature to image format. Returns the Future<ui.Image>. Optionally you can set the pixel ratio of the image as a parameter. The higher the high quality image. See also:
- renderToContext2D, renders the signature to a HTML canvas.
Implementation
Future<ui.Image> toImage({double pixelRatio = 1.0}) async {
// ignore: avoid_as
return (layer! as OffsetLayer)
.toImage(Offset.zero & size, pixelRatio: pixelRatio);
}