KeepAlive constructor Null safety

const KeepAlive(
  1. {Key? key,
  2. required bool keepAlive,
  3. required Widget child}
)

Marks a child as needing to remain alive.

The child and keepAlive arguments must not be null.

Implementation

const KeepAlive({
  super.key,
  required this.keepAlive,
  required super.child,
}) : assert(child != null),
     assert(keepAlive != null);