isEmpty property
bool
get
isEmpty
Gets whether the PDFColor is Empty or not.
//Create a new PDF document.
PdfDocument document = PdfDocument();
//Create a new PDF pen instance.
PdfColor color = PdfColor.empty;
//Draw rectangle with the pen.
document.pages.add().graphics.drawString('Color present: ${color.isEmpty}',
PdfStandardFont(PdfFontFamily.helvetica, 12),
pen: PdfPen(color));
//Save the document.
List<int> bytes = await document.save();
//Close the document.
document.dispose();
Implementation
bool get isEmpty => !_helper.isFilled;