g property Null safety

int g

Gets or sets Green channel value.

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

Implementation

int get g => _green;
void g=(int value)

Implementation

set g(int value) {
  _green = value;
  _assignCMYK(_red, _green, _blue);
  _isFilled = true;
}