toImage method

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

Implementation

Future<ui.Image> toImage({
  double pixelRatio = 2.0,
}) async {
  RenderRepaintBoundary boundary =
      painterKey.currentContext!.findRenderObject() as RenderRepaintBoundary;
  ui.Image image = await boundary.toImage(pixelRatio: pixelRatio);
  return image;
}