How to Get Code Coverage Statistics in a Flutter Project

Code coverage can help you gauge the extent of your testing and give you greater visibility into how thoroughly you are testing you app. All you have to do is the following

brew install lcov
flutter test --coverage
genhtml coverage/lcov.info -o coverage/html