Overlay constructor Null safety

const Overlay(
  1. {Key? key,
  2. List<OverlayEntry> initialEntries,
  3. Clip clipBehavior}
)

Creates an overlay.

The initial entries will be inserted into the overlay when its associated OverlayState is initialized.

Rather than creating an overlay, consider using the overlay that is created by the Navigator in a WidgetsApp or a MaterialApp for the application.

Implementation

const Overlay({
  Key? key,
  this.initialEntries = const <OverlayEntry>[],
  this.clipBehavior = Clip.hardEdge,
}) : assert(initialEntries != null),
     assert(clipBehavior != null),
     super(key: key);