toPdfImageProvider method

Future<ImageProvider> toPdfImageProvider()

Implementation

Future<pw.ImageProvider> toPdfImageProvider() async {
  final MapEntry<Uint8List?, Size> tuple = await getBytes();

  return pw.RawImage(
    bytes: tuple.key!,
    width: tuple.value.width.toInt(),
    height: tuple.value.height.toInt(),
  );
}