GridPaper constructor Null safety

const GridPaper(
  1. {Key? key,
  2. Color color = const Color(0x7FC3E8F3),
  3. double interval = 100.0,
  4. int divisions = 2,
  5. int subdivisions = 5,
  6. Widget? child}
)

Creates a widget that draws a rectilinear grid of 1-pixel-wide lines.

Implementation

const GridPaper({
  super.key,
  this.color = const Color(0x7FC3E8F3),
  this.interval = 100.0,
  this.divisions = 2,
  this.subdivisions = 5,
  this.child,
}) : assert(divisions > 0, 'The "divisions" property must be greater than zero. If there were no divisions, the grid paper would not paint anything.'),
     assert(subdivisions > 0, 'The "subdivisions" property must be greater than zero. If there were no subdivisions, the grid paper would not paint anything.');