width property
Width of an image
//Creates a new PDF document.
PdfDocument doc = PdfDocument();
//Create a PDF image instance.
PdfImage image = PdfBitmap(imageData);
//Draw the image with image's width and height.
doc.pages
.add()
.graphics
.drawImage(image, Rect.fromLTWH(0, 0, image.width, image.height));
//Saves the document.
List<int> bytes = doc.save();
//Dispose the document.
doc.dispose();
Implementation
@override
int get width => _width;