lookupClassMetaData method Null safety

List<Object> lookupClassMetaData(
  1. ClassMirror? classMirror
)

Implementation

List<Object> lookupClassMetaData(ClassMirror? classMirror) {
  if (classMirror == null) {
    return [];
  }
  final result = [...classMirror.metadata];
  result.addAll(lookupClassMetaData(_safeGetSuperClassMirror(classMirror)));
  for (var superinterface in classMirror.superinterfaces) {
    result.addAll(lookupClassMetaData(superinterface));
  }
  return result;
}