flutter_devstat is a lightweight command-line utility that helps you maintain clean and consistent Flutter project structures.
It automatically annotates all Dart files in your Flutter app with their file paths (like // lib/config.dart), making large projects easier to navigate and refactor.
- 🗂 Annotate Dart files with file path headers
- 🔁 Update existing annotations automatically when files move or rename
- 📄 Analyze project structure or generate reports
- 🧭 Flexible CLI flags:
-a→ Annotate or update all Dart files-v→ Show current version-u,-h→ Show usage/help info-p,--paths→ Show all Dart file paths instead of the tree view
flutter pub add flutter_devstat --devdart pub global activate flutter_devstatdart run flutter_devstat -adart run flutter_devstat -hdart run flutter_devstat -v✅ Annotating Dart files...
🔹 Updated: // lib/main.dart
🔹 Added: // lib/widgets/button.dart
✅ 23 files processed successfully.
Before:
import 'package:flutter/material.dart';
class AppConfig {}After running flutter_devstat -a:
// lib/config.dart
import 'package:flutter/material.dart';
class AppConfig {}If you want to modify or contribute to the tool locally:
git clone https://github.com/bxamra/flutter_devstat.git
cd flutter_devstatdart run bin/flutter_devstat.dart -adart testBefore publishing to pub.dev:
- Update version in
pubspec.yaml - Run checks:
dart pub publish --dry-run
- Then publish:
dart pub publish
🚀 Flutter Project Structure Analyzer (DevStat)
v1.1 © BXAMRA
│flutter_devstat/
│
└──│lib/ - 5 files
│
├──|config.dart
├──|utils/
│ ├──-logger.dart
│ └──-validator.dart
└──-main.dart
Total 5 files across 2 directories
You can try out Flutter DevStat by running the example:
dart run example/example.dartThis project is licensed under the MIT License.
BXAMRA
📧 bxamra@icloud.com
🌐 bxamra.github.io