WidgetModel constructor

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

Implementation

WidgetModel(this.parent, String? id, {Scope? scope})
{
  // set the id
  this.id = _toId(id);

  // set the scope
  this.scope = scope ?? Scope.of(this);

  // set the framework
  framework = findAncestorOfExactType(FrameworkModel);

  // register the model
  this.scope?.registerModel(this);
}