Border constructor Null safety

const Border(
  1. {BorderSide top = BorderSide.none,
  2. BorderSide right = BorderSide.none,
  3. BorderSide bottom = BorderSide.none,
  4. BorderSide left = BorderSide.none}
)

Creates a border.

All the sides of the border default to BorderSide.none.

The arguments must not be null.

Implementation

const Border({
  this.top = BorderSide.none,
  this.right = BorderSide.none,
  this.bottom = BorderSide.none,
  this.left = BorderSide.none,
}) : assert(top != null),
     assert(right != null),
     assert(bottom != null),
     assert(left != null);