require<T> function
必须的获取对象, 返回不为null
Implementation
T require<T>([String? name]) {
final T result = _container.resolve(name);
if (result == null) throw '你他妈都没注册${T.toString()}类型的对象, 你搁这跟我要什么要对象?';
return result;
}
必须的获取对象, 返回不为null
T require<T>([String? name]) {
final T result = _container.resolve(name);
if (result == null) throw '你他妈都没注册${T.toString()}类型的对象, 你搁这跟我要什么要对象?';
return result;
}