addObject<T extends Core<CoreContext>> method Null safety

  1. @override
T? addObject<T extends Core<CoreContext>>(
  1. T? object
)

Implementation

@override
T? addObject<T extends Core>(T? object) {
  object?.context = this;
  object?.id = _objects.length;

  _objects.add(object);
  return object;
}