persistent property

bool persistent
final

Whether this Flash is add to route.

Must be non-null, defaults to true

If true the Flash will not add to route.

If false, the Flash will add to route as a LocalHistoryEntry. Typically the page is wrap with Overlay.

This can be useful in situations where the app needs to dismiss the Flash with Navigator.pop.

Navigator.of(context).push(MaterialPageRoute(builder: (context) {
  return Overlay(
    initialEntries: [
      OverlayEntry(builder: (context) {
        return FlashPage();
      }),
    ],
  );

Implementation

final bool persistent;