downloadImageAsset method

Future<bool> downloadImageAsset(
  1. String assetKey, {
  2. int x = 0,
  3. int y = 0,
  4. double scale = 1,
  5. int printerDpi = 203,
})

Downloads the image from the Flutter assets into the printer under the specified file name,

Implementation

//Future<Image> downloadImageAsset(String assetKey,
Future<bool> downloadImageAsset(String assetKey,
    {int x = 0, int y = 0, double scale = 1, int printerDpi = 203}) async {
  Image image = await BrotherUtils.loadImage(assetKey);
  return downloadImage(image,
      x: x, y: y, scale: scale, printerDpi: printerDpi);
}