Here I have to use pdfImageFromImageProvider function to stateless widget. So, Is it possible to resolve this issue using stateless widget?
Future<Widget> getWidgetAsync(double size) async {
PdfImage val = await pdfImageFromImageProvider(
pdf: pdf.document,
image: fw.AssetImage('assets/' + iconPath),
);
return Container(
width: size,
height: size,
decoration: BoxDecoration(
color: layoutbg,
shape: BoxShape.circle,
),
child: Image(val),
);
}