Component constructor

Component(
  1. String name,
  2. Component? parent
)

Constructs an instance of this Component named name and with parent parent.

Implementation

Component(this.name, this.parent) {
  parent?._components.add(this);
}