flutter_base_kit 1.2.0
flutter_base_kit: ^1.2.0 copied to clipboard
A comprehensive Flutter development kit with base classes, utilities, and common patterns for faster app development.
Flutter Base Kit 🚀 #
[Flutter Base Kit Logo]
One-click configuration of project foundation using best practices and time-tested templates
Create new Flutter applications with pre-configured architecture: routing, DI, networking, localization, theming, and much more.
Why Flutter Base Kit? #
- ⚡ Quick Start - don't waste time setting up architecture
- 🏗️ Ready Structure - DI, routing, API, themes, localization
- 📱 Best Practices - proven architecture from real projects
- 🔧 CLI Tool - create projects with a single command
Installation #
Activate package globally #
dart pub global activate flutter_base_kit
If command not found
Windows:
- Add to PATH:
%LOCALAPPDATA%\Pub\Cache\bin
macOS/Linux:
- Add to ~/.bashrc or ~/.zshrc:
export PATH="$PATH":"$HOME/.pub-cache/bin"
📋 If you don't have Dart/Flutter SDK installed
Windows #
- Download Flutter SDK from flutter.dev
- Extract and add to PATH
- Run
flutter doctor
macOS #
brew install flutter
flutter doctor
Linux #
sudo snap install flutter --classic
flutter doctor
How to use #
Option 1: Create a new project #
# Create an app
flutter_base_kit create my_app --template app
# Create a package
flutter_base_kit create my_package --template package
# Create a package with tester
flutter_base_kit create my_project --template package+tester
Option 2: Add to existing project #
# Navigate to your project folder
cd my_existing_project
# Initialize Flutter Base Kit
flutter_base_kit init
What you get in the project #
📁 Application structure #
lib/
├── api/ # API and network requests
├── core/ # Core logic
├── di/ # Dependency injection
├── l10n/ # Localization (EN, ES)
├── models/ # Data models
├── routes/ # Navigation
├── services/ # Services
├── themes/ # Theming
├── ui/ # UI components
└── utils/ # Utilities
🛠️ Ready components #
- Routing - AutoRoute for navigation
- DI - GetIt + Injectable for dependency management
- API - Dio + Retrofit for server communication
- State - Provider + Bloc for state management
- Themes - Flexible theming with light/dark support
- Localization - Support for English and Spanish languages
- Code Generation - Freezed, JSON, routes are generated automatically
Command examples #
# Create an app
flutter_base_kit create my_app --template app --org com.mycompany
# Create a package
flutter_base_kit create my_package --template package
# Create a monorepo (package + tester)
flutter_base_kit create my_library --template package+tester --org com.mycompany
# Add to existing project
flutter_base_kit init
Next steps #
After creating a project:
-
Navigate to project folder:
cd my_app
-
Install dependencies:
flutter pub get
-
Generate code:
flutter packages pub run build_runner build
-
Run the app:
flutter run
Useful commands #
# Show help
flutter_base_kit --help
# Generate code (in project)
flutter packages pub run build_runner build --delete-conflicting-outputs
Template types #
app
- Full Flutter application with all componentspackage
- Flutter package/plugin for code reusepackage+tester
- Package + separate testing application
Command options #
--org
- Organization identifier (e.g., com.mycompany)--template
- Template type (app, package, package+tester)--help
- Show help
Dependencies #
Core Dependencies #
flutter_bloc
: State managementget_it
: Dependency injectioninjectable
: Code generation for DIauto_route
: Declarative routingdio
: HTTP clientretrofit
: Type-safe HTTP clientfreezed
: Immutable data classesjson_annotation
: JSON serializationflutter_localizations
: Localization support
Development Dependencies #
build_runner
: Code generationinjectable_generator
: DI code generationauto_route_generator
: Route code generationretrofit_generator
: Retrofit code generationjson_serializable
: JSON code generationfreezed
: Freezed code generationflutter_gen_runner
: Asset code generation
Configuration #
Localization #
Add ARB files to lib/l10n/
:
app_en.arb
- English translationsapp_es.arb
- Spanish translations
Troubleshooting #
Code generation errors #
# Clear cache and regenerate
flutter packages pub run build_runner clean
flutter packages pub run build_runner build --delete-conflicting-outputs
Support #
Support the project #
If you find this package helpful, consider supporting its development:
License #
MIT License - see LICENSE file