printImage method

Future<String?> printImage(
  1. String assetPath, {
  2. String x = '10',
  3. String y = '10',
})

Prints an image loaded from a Flutter asset.

assetPath must be a valid key registered in pubspec.yaml assets, e.g. 'assets/logo.png'.

Implementation

Future<String?> printImage(
  String assetPath, {
  String x = '10',
  String y = '10',
}) async {
  final File imageFile = await _imageService.getImageFileFromAssets(assetPath);
  return _repository.printImage(imageFile.path, x: x, y: y);
}