UniqueWidget({@required GlobalKey<T> key })

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

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

Source

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