RestorationScope constructor Null safety

const RestorationScope(
  1. {Key? key,
  2. required String? restorationId,
  3. required Widget child}

Creates a RestorationScope.

Providing null as the restorationId turns off state restoration for the child and its descendants.

The child must not be null.


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