Flutter Isolated Reporter is a focused CLI utility for extracting a single file's coverage details from a global LCOV report. It is designed for fast feedback while you are working on a specific file, without digging through the full project report.
- Isolates one file's LCOV record by file name or full path.
- Prints a concise line coverage summary to stdout.
- Optional HTML report generation via
genhtmlfor visual review. - Clean CLI output suited for local use and CI logs.
- Python 3.8+
click(installed via package dependencies)genhtmlfor HTML output (part of thelcovtoolkit)- macOS:
brew install lcov - Windows (Chocolatey):
choco install lcov
- macOS:
Quick check (default coverage/lcov.info)
fir my_widget.dartSpecify LCOV path
fir --input coverage/lcov.info my_widget.dartGenerate HTML for one file
fir my_widget.dart --htmlHTML + All Tests dashboard (copy/paste ready)
flutter test --coverage --machine > coverage/test_results.json
fir my_widget.dart --html --exporter --test-results coverage/test_results.jsonSame, with an explicit LCOV path
flutter test --coverage --machine > coverage/test_results.json
fir my_widget.dart --html --exporter --test-results coverage/test_results.json --input coverage/lcov.infoAdd the user-level bin directory to PATH so a pip install --user . exposes fir everywhere.
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc # zsh
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc && source ~/.bashrc # bash
python3 -m pip install --user .
command -v fir# Add user Scripts dir to PATH for this session
$env:Path += ";$HOME\AppData\Roaming\Python\Scripts"
# Persist it for future sessions
[Environment]::SetEnvironmentVariable('Path', "$env:Path;${HOME}\AppData\Roaming\Python\Scripts", 'User')
# Install
python -m pip install --user .
# Verify
Get-Command fir- Clone and enter the project
git clone https://github.com/muricdev/flutter_isolated_reporter.git
cd flutter_isolated_reporter- Create and activate a virtualenv
python3 -m venv .venv
source .venv/bin/activate- Upgrade pip and install in editable mode
python3 -m pip install --upgrade pip
python3 -m pip install -e .- (Optional) Install lcov for HTML output
brew install lcov # macOS
sudo apt install lcov # Debian/Ubuntu- Verify the CLI is available
fir --helpFor development extras (tests, coverage):
python3 -m pip install -e '.[dev]'