toImage method

Future<Image> toImage({
  1. double pixelRatio = 1.0,
})

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:

Implementation

Future<ui.Image> toImage({double pixelRatio = 1.0}) async {
  // ignore: avoid_as
  return (layer! as OffsetLayer)
      .toImage(Offset.zero & size, pixelRatio: pixelRatio);
}