ScaffoldMessenger constructor Null safety

const ScaffoldMessenger(
  1. {Key? key,
  2. required Widget child}
)

Creates a widget that manages SnackBars for Scaffold descendants.

Implementation

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