Coming soon! See https://github.com/flutter/devtools/issues/3951.
This is helper for testing leak_tracker.
They are separated from leak_tracker to make sure testing code is not used in production.
To test for leaks with descriptive messages, use isLeakFree against a Leaks instance:
final leaks = await LeakTracking.collectLeaks(); expect(leaks, isLeakFree);
See more examples in end_to_end_test.dart.