resolve<T> method Null safety

  1. @override
T? resolve<T>(
  1. int id
)

Implementation

@override
T? resolve<T>(int id) {
  if (id >= _objects.length || id < 0) {
    return null;
  }
  var object = _objects[id];
  if (object is T) {
    return object as T;
  }
  return null;
}