printWidget method
Prints a widget identified by printableKey
using the provided config
.
Make sure the widget is a Printable
-Widget. Only this
is able to extract the image data from the widget.
Implementation
Future<void> printWidget(GlobalKey printableKey, PrintConfig config) async =>
print(await imageFromWidget(printableKey), config);