iconToBytesHiRes static method
Converts an IconData to PNG bytes with high resolution for better quality.
This method renders the icon at 2x the specified size and is useful for PDF generation where higher resolution produces better results.
icon is the IconData to convert.
size is the logical size of the icon (the actual rendered size will be 2x).
color is the color of the icon.
Returns the PNG bytes of the rendered icon at 2x resolution.
Implementation
static Future<Uint8List> iconToBytesHiRes(
IconData icon, {
double size = 48,
Color color = Colors.black,
}) async {
return iconToBytes(icon, size: size * 2, color: color);
}