How to get a list of all loaded libraries in dart?


Is it possible to make some call from main to get all the loaded libraries at runtime?

  Iterable<LibraryMirror> libraries = getAllLoadedLibraries();

I see there is a Type LibraryMirror in the mirrors package but I don’t see how you would get a library mirror since you can’t just reference them in code like a top level function/variable or class name.


import 'dart:mirrors`;


Answered By – Günter Zöchbauer

Answer Checked By – Senaida (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *