HeroMode constructor Null safety

const HeroMode(
  1. {Key? key,
  2. required Widget child,
  3. bool enabled = true}
)

Creates a widget that enables or disables Heroes.

The child and enabled arguments must not be null.

Implementation

const HeroMode({
  super.key,
  required this.child,
  this.enabled = true,
}) : assert(child != null),
     assert(enabled != null);