flutter_structure_maker 1.0.1 copy "flutter_structure_maker: ^1.0.1" to clipboard
flutter_structure_maker: ^1.0.1 copied to clipboard

A simple CLI tool to generate folder structure for Flutter projects automatically.

Flutter Structure Maker 🚀 #

A command-line tool to quickly generate organized folder structures for Flutter projects. Save time and maintain consistency across your Flutter applications with pre-defined architectural patterns.

Features #

Multiple Architecture Patterns

  • Basic structure for simple projects
  • MVC (Model-View-Controller) pattern
  • GetX architecture pattern

🎯 Quick Setup

  • Generate folder structure with a single command
  • Auto-creates main.dart if it doesn't exist
  • Supports recursive directory creation

📦 Lightweight

  • Minimal dependencies
  • Fast execution
  • Easy to use

Installation #

Add this to your pubspec.yaml:

dependencies:
  flutter_structure_maker: ^1.0.0

Or install globally:

dart pub global activate flutter_structure_maker

Usage #

Basic Usage #

Navigate to your Flutter project root and run:

dart run flutter_structure_maker

This creates a basic folder structure:

lib/
├── controllers/
├── views/
├── models/
├── services/
└── utils/

With Patterns #

MVC Pattern:

dart run flutter_structure_maker --pattern mvc

Creates:

lib/
├── controllers/
├── views/
└── models/

GetX Pattern:

dart run flutter_structure_maker --pattern getx

Creates:

lib/
└── app/
    ├── modules/
    ├── routes/
    ├── controllers/
    ├── services/
    └── widgets/

Command-Line Options #

Option Alias Description Default
--pattern -p Architecture pattern (basic, mvc, getx) basic
--help -h Show usage information -

Examples #

# Show help
dart run flutter_structure_maker --help

# Create MVC structure
dart run flutter_structure_maker -p mvc

# Create GetX structure
dart run flutter_structure_maker -p getx

Supported Patterns #

Basic #

General-purpose structure suitable for most Flutter projects:

  • controllers/ - Business logic and state management
  • views/ - UI screens and pages
  • models/ - Data models and entities
  • services/ - API calls, database operations
  • utils/ - Helper functions and constants

MVC (Model-View-Controller) #

Classic architectural pattern for Flutter:

  • controllers/ - Application logic
  • views/ - UI components
  • models/ - Data structures

GetX #

Optimized for GetX state management:

  • app/modules/ - Feature modules
  • app/routes/ - Navigation routing
  • app/controllers/ - GetX controllers
  • app/services/ - API and data services
  • app/widgets/ - Reusable widgets

Requirements #

environment:
  sdk: ">=2.12.0 <4.0.0"
  flutter: ">=2.0.0"

Contributing #

Contributions are welcome! Please feel free to submit a Pull Request.

License #

This project is licensed under the MIT License - see the LICENSE file for details.

Author #

Created with ❤️ for the Flutter community

Changelog #

See CHANGELOG.md for version history.

Support #

1
likes
135
points
30
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A simple CLI tool to generate folder structure for Flutter projects automatically.

Homepage

License

MIT (license)

Dependencies

args, path

More

Packages that depend on flutter_structure_maker