libraries property

  1. @override
Map<Uri, LibraryMirror> get libraries
inherited

Returns a map of all libraries in the current isolate.

Implementation

@override
Map<Uri, LibraryMirror> get libraries {
  ReflectorData reflectorData = data[this]!;
  if (reflectorData.libraryMirrors == null) {
    throw NoSuchCapabilityError('Using `libraries` without capability. '
        'Try adding `libraryCapability`.');
  }
  var result = <Uri, LibraryMirror>{};
  for (LibraryMirror library in reflectorData.libraryMirrors!) {
    result[library.uri] = library;
  }
  return UnmodifiableMapView(result);
}