demoKey property

GlobalKey<State<StatefulWidget>> demoKey
final

Marks where the demo starts, so inspection can report the demo rather than the catalog chrome standing above it.

A GlobalKey rather than a held Element: the subtree is remounted on every entry switch, so anything holding an element would be holding the previous entry's. This one sits on the wrapper around the changing subtree and so survives the switch.

Implementation

static final demoKey = GlobalKey(debugLabel: 'flutterware.demo');