How can the code coverage data from Flutter tests be displayed?

Question

Asked by peopletookallthegoodnames on June 11, 2018 (source).

I'm working on a Flutter app using Android Studio as my IDE. I'm attempting to write tests and check the code coverage but I can't work out how to view the data in the IDE or any other application.

By running flutter test --coverage, a coverage report seems to be generated into a file /coverage/lcov.info. That file looks something like this:

SF:lib\data\Customer.g.dart
DA:9,2
DA:10,2
DA:11,2
DA:12,2
DA:13,2
DA:20,0
DA:21,0
DA:22,0
DA:23,0
DA:24,0
...

Looking at the file it seems to have a list of my project files with line by line coverage data. Is there a way to view this information in Android Studio?

Answer

Question answered by Austin T (source).

With the release of Flutter 2.5, you can now view test coverage within IntelliJ and Android Studio.
See this post

In addition, the latest IJ/AS plugin for Flutter allows you to see the coverage information for both unit test and integration test runs. You can access this from the toolbar button next to the “Debug” button:

Android Studio and IntelliJ: enter image description here

CODE-COVERAGE FLUTTER TESTING
SHARE: