Spacer constructor Null safety

const Spacer(
  1. {Key? key,
  2. int flex = 1}
)

Creates a flexible space to insert into a Flexible widget.

The flex parameter may not be null or less than one.

Implementation

const Spacer({super.key, this.flex = 1})
  : assert(flex != null),
    assert(flex > 0);