getAsReactive<T> static method
Get the singleton ReactiveModel instance of a model registered with Injector.
Implementation
static ReactiveModel<T> getAsReactive<T>({
dynamic name,
bool silent = false,
}) {
final String _name = name == null ? '$T' : name.toString();
final Inject<T> inject = _getInject<T>(_name, silent);
final reactiveModel = inject.injected;
// assert(
// () {
// if (reactiveModel.state is StatesRebuilder) {
// throw Exception(
// 'Injected model extends StatesRebuilder',
// );
// }
// return true;
// }(),
// );
return reactiveModel;
}