capabilities property Null safety

List<ReflectCapability> capabilities
inherited

Specifies limits on the support for reflective operations on instances of classes having an instance of this ReflectableBase as metadata.

Implementation

List<ReflectCapability> get capabilities {
  if (_capabilitiesGivenAsList) return _capabilities!;
  var result = <ReflectCapability>[];
  void add(ReflectCapability? cap) {
    if (cap != null) result.add(cap);
  }

  add(_cap0);
  add(_cap1);
  add(_cap2);
  add(_cap3);
  add(_cap4);
  add(_cap5);
  add(_cap6);
  add(_cap7);
  add(_cap8);
  add(_cap9);
  return result;
}