UniqueWidget<T extends State<StatefulWidget>> constructor

const UniqueWidget<T extends State<StatefulWidget>>({@required GlobalKey<T> key })

Creates a widget that has exactly one inflated instance in the tree.

The key argument must not be null because it identifies the unique inflated instance of this widget.

Implementation

const UniqueWidget({
  @required GlobalKey<T> key,
}) : assert(key != null),
     super(key: key);