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.


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