Scope constructor

Scope({
  1. Scope? parent,
  2. String? id,
})

Implementation

Scope({this.parent, String? id}) {
  this.id = id ?? newId();

  // add me as a child of my parent
  parent?.addChild(this);

  // add me to my applications scope manager
  System.currentApp?.scopeManager.add(this);
}