toImage method
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;
}