Flutter Starter Kit CLI 🚀

Dart Platform GitHub Repo Pub Version

A command-line tool to scaffold Flutter projects quickly with clean architecture, Firebase, REST APIs, core utilities, theming, routing, and feature scaffolding.


🌟 Features

  • Initialize a Flutter project with ready-to-use core folders
  • Add features with view, model, and viewmodel
  • Add reusable widgets
  • Add services for API handling, storage, or business logic
  • Splash screen setup
  • Modular architecture using GoRouter for routing

💻 Installation

From Pub.dev

dart pub global activate flutter_starter_kit

Add to PATH

Windows:

$env:PATH += ";$env:USERPROFILE\.pub-cache\bin"

Linux/macOS:

export PATH="$PATH:$HOME/.pub-cache/bin"

Check Installation

flutter_starter_kit --help

Local Development (for testing)

git clone https://github.com/NishanthDeveloper/flutter_starter_kit.git
cd flutter_starter_kit
dart pub global activate --source path .

📋 Commands

Command Badge Description Example
init Init Initializes minimal project structure with core folders and splash feature flutter_starter_kit init
add feature <name> Feature Adds a new feature module with model, view, and viewmodel flutter_starter_kit add feature auth
add widget <name> Widget Adds a reusable widget flutter_starter_kit add widget app_button
add service <name> Service Adds a new service file flutter_starter_kit add service auth_service
--help Help Shows help for all commands flutter_starter_kit --help

lib/
├── core/
│   ├── colors/
│   │   └── app_colors.dart
│   ├── theme/
│   │   ├── app_themes.dart
│   │   └── app_text_styles.dart
│   ├── strings/
│   │   └── app_strings.dart
│   ├── widgets/
│   │   ├── app_button.dart
│   │   ├── app_textfield.dart
│   │   └── app_card.dart
│   ├── routing/
│   │   ├── app_router.dart
│   │   └── app_routes.dart
│   └── services/
│       └── auth_service.dart
├── features/
│   ├── splash/
│   │   └── view/
│   │       └── splash_page.dart
│   └── auth/
│       ├── model/
│       │   └── auth_model.dart
│       ├── view/
│       │   └── auth_page.dart
│       └── viewmodel/
│           └── auth_viewmodel.dart
└── main.dart

🚀 Quick Start

Initialize Project

flutter_starter_kit init

Add Features

flutter_starter_kit add feature splash
flutter_starter_kit add feature auth

Add Widgets

flutter_starter_kit add widget app_button
flutter_starter_kit add widget app_card

Add Services

flutter_starter_kit add service auth_service
flutter_starter_kit add service storage_service

Check CLI Commands

flutter_starter_kit --help

🔧 Best Practices

  • Run flutter_starter_kit init before adding features, widgets, or services
  • Keep reusable UI components in core/widgets
  • Keep theming and constants in core/colors and core/theme
  • Each feature should have its own folder (model, view, viewmodel) for modularity
  • Services should reside in core/services


📖 Notes

  • Supports Firebase, REST API, and Clean Architecture scaffolding
  • Generated files are ready to use and can be extended
  • Helps developers focus on business logic instead of boilerplate

Libraries