Skip to content

BXAMRA/flutter_devstat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧰 flutter_devstat

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.

πŸš€ Features

  • πŸ—‚ 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

πŸ“¦ Installation

πŸ”Ή Add to a Flutter project

flutter pub add flutter_devstat --dev

πŸ”Ή Activate globally

dart pub global activate flutter_devstat

πŸ§‘β€πŸ’» Usage

Annotate or update all Dart files:

dart run flutter_devstat -a

Display help/usage:

dart run flutter_devstat -h

Show version:

dart run flutter_devstat -v

Example output:

βœ… Annotating Dart files...
πŸ”Ή Updated: // lib/main.dart
πŸ”Ή Added:   // lib/widgets/button.dart
βœ… 23 files processed successfully.

🧾 Project Identity Configuration (v1.3.2+)

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

Example header output:

// 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.

🧩 Example Dart File

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 {}

βš™οΈ Development

If you want to modify or contribute to the tool locally:

Clone the repository:

git clone https://github.com/bxamra/flutter_devstat.git
cd flutter_devstat

Run directly:

dart run bin/flutter_devstat.dart -a

Run tests:

dart test

πŸ“€ Publishing (for maintainers)

Before publishing to pub.dev:

  1. Update version in pubspec.yaml

  2. Run checks:

    dart pub publish --dry-run
  3. Then publish:

    dart pub publish

🧾 Example Output (Project Tree Mode)

πŸš€ 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

Example

You can try out Flutter DevStat by running the example:

dart run example/example.dart

🏷 License

This project is licensed under the MIT License.

πŸ‘€ Author

BXAMRA πŸ“§ bxamra@icloud.com 🌐 bxamra.github.io

About

A Flutter project structure analyzer and file annotator (DevStat)

Resources

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE
Unknown
LICENSE.md

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages