width property

double width

Gets or sets the width of the pen.

//Create a new PDF document.
PdfDocument document = PdfDocument()
  ..pages.add().graphics.drawRectangle(
      //Set pen width.
      pen: PdfPen(PdfColor(255, 0, 0), width: 4),
      bounds: Rect.fromLTWH(10, 10, 200, 100));
//Save the document.
List<int> bytes = await document.save();
//Close the document.
document.dispose();

Implementation

double get width => _width;
void width=(double value)

Implementation

set width(double value) {
  _checkImmutability();
  _width = value;
}