I have a library which is quite large but only exposes a very tiny API to make it easy to use and learn for new users. I would like to keep my library this way, but I also want to ensure that I have as much unit test coverage as possible, I would like to be able to directly unit test all of my classes but so far as I can tell I can only unit test the public API of the library.
I can, of course, write unit tests to fully test the public methods which will effectively indirectly test all of the underlying private classes, but if a test fails it could mean a lot of digging around in the private code to find out where something went wrong, rather than having unit tests for each individual private class so when something goes wrong it's immediately apparent what went wrong and where.
Is there a design pattern to help with this situation or a way for unit testing to be written for private dart classes and methods?