Model constructor
Implementation
Model(this.parent, String? id, {Scope? scope, dynamic data}) {
// set the id
this.id = getUniqueId(id);
// set the scope
this.scope = scope ?? Scope.of(this);
isLocalScope = scope != null;
// set the framework
framework = findAncestorOfExactType(FrameworkModel);
// set the data
if (data != null) this.data = data;
// register the model
this.scope?.registerModel(this);
}