VisualDensity constructor Null safety

const VisualDensity(
  1. {double horizontal = 0.0,
  2. double vertical = 0.0}
)

A const constructor for VisualDensity.

All of the arguments must be non-null, and horizontal and vertical must be in the interval between minimumDensity and maximumDensity, inclusive.

Implementation

const VisualDensity({
  this.horizontal = 0.0,
  this.vertical = 0.0,
}) : assert(horizontal != null),
     assert(vertical != null),
     assert(vertical <= maximumDensity),
     assert(vertical <= maximumDensity),
     assert(vertical >= minimumDensity),
     assert(horizontal <= maximumDensity),
     assert(horizontal >= minimumDensity);