register static method
Register widget to the Host, and add aspects to the regAspects
return the TModel
Implementation
static void register(
BuildContext context, {
Iterable<Object>? aspects,
}) {
if (aspects == null || aspects.isEmpty) {
InheritedMediator.inheritFrom<InheritedMediator>(context);
// aspects is null, no need to `addRegAspects`
return;
}
InheritedMediator.inheritFrom<InheritedMediator>(context, aspect: aspects);
/// Add [aspects] to the registered aspects of the model
// if (aspects != null) {
_globalAllAspects.addAll(aspects);
// }
}