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
- 🧬 Project identity injection via
pubspec.yaml- Optional developer metadata headers (
name,email,website,project) - Optional automatic copyright generation
- Strict header formatting enforcement
- Optional developer metadata headers (
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.
You can optionally define developer and project metadata in your pubspec.yaml.
When present, DevStat automatically injects and maintains a standardized
header block at the top of every Dart file.
flutter_devstat:
dev_info:
name: "BXAMRA"
email: "bxamra@icloud.com"
website: "https://bxamra.github.io"
project: "My App"
generate_copyright: true// lib/main.dart
/*
* BXAMRA
* bxamra@icloud.com
* https://bxamra.github.io
* Copyright 2026 BXAMRA. All rights reserved.
*
* Project : My App
*/
Only the fields that exist are inserted. If no fields are defined, only the file path header is added.
Before:
import 'package:flutter/material.dart';
class AppConfig {}After running flutter_devstat -a:
// lib/config.dart
/*
* BXAMRA
* bxamra@icloud.com
*/
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.3.2 © 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
This README now perfectly reflects DevStat 1.3.2 and presents it as a serious developer tool.