Skip to content

mmj-dev-git/stacked_plus

Repository files navigation

Stacked_plus License: MIT

A Flutter project built on the Stacked framework — a powerful architecture solution for production-ready applications.

Stacked provides amazing solutions for dependency injection, state management, routing, and more. However, there are some must-have libraries that are incredibly handy in development and ones we use daily when building high-quality apps.

Stacked_plus includes these core libraries so you can get started building your next app quickly, without wasting time on setting up the base project structure.

More details about Stacked can be found here: Stacked Documentation

This project-specific startup flow is documented in Stacked startup logic.


Included Libraries & Purpose

📦 Project Management & Workflow

Library Purpose Link
Melos Manage multi-package Flutter/Dart projects efficiently. See melos.yaml for available commands. melos.invertase.dev
FVM Flutter Version Manager for consistent Flutter SDK usage across teams. fvm.app
Husky Git hooks to run checks and scripts before commits or pushes. typicode.github.io/husky
total_lints Standardized lints for cleaner, maintainable code. pub.dev/packages/total_lints

🌍 Localization & Multi-Environment

Library Purpose Link
DevicePreview Preview and test your app on multiple devices & resolutions. pub.dev/packages/device_preview
flutter_flavor Set up multiple app flavors (test/dev/prod) with 3 Google JSON configs. pub.dev/packages/flutter_flavor
intl_utils Generate localization code from .arb files. pub.dev/packages/intl_utils
flutter_localizations Flutter’s built-in localization support. api.flutter.dev/flutter/flutter_localizations

🔥 Firebase Integration

Library Purpose Link
firebase_analytics Track user engagement and events. Setup with flutterfire configure. firebase.google.com/docs/analytics
firebase_crashlytics Capture and report app crashes in real-time. firebase.google.com/docs/crashlytics

🗂 State Management & Data

Library Purpose Link
freezed_annotation Immutable classes & union types for safer state management. pub.dev/packages/freezed_annotation
hive Lightweight, fast, NoSQL database for Flutter. pub.dev/packages/hive

🛠 Utilities

Library Purpose Link
logger Simple, colorful, and formatted logging. pub.dev/packages/logger
flutter_launcher_icons Easily generate app launcher icons. pub.dev/packages/flutter_launcher_icons
form_validation Simplify form field validations. pub.dev/packages/form_validation

With Stacked_plus, you get a ready-to-use foundation that combines the power of Stacked with essential tools and libraries for building robust, scalable, and production-ready Flutter apps.

🚀 Quick Start

Add google-services in android/add

Firebase setup

Firebase Web requires explicit FirebaseOptions. If the app throws FirebaseOptions cannot be null when creating the default app, provide Firebase Web config values with Dart defines:

flutter run -d chrome `
  --dart-define=FIREBASE_API_KEY=your-api-key `
  --dart-define=FIREBASE_APP_ID=your-app-id `
  --dart-define=FIREBASE_MESSAGING_SENDER_ID=your-sender-id `
  --dart-define=FIREBASE_PROJECT_ID=your-project-id `
  --dart-define=FIREBASE_AUTH_DOMAIN=your-project.firebaseapp.com `
  --dart-define=FIREBASE_STORAGE_BUCKET=your-project.appspot.com `
  --dart-define=FIREBASE_MEASUREMENT_ID=your-measurement-id

The app reads those values in lib/app/firebase_config.dart. Until the required web values are provided, the app skips Firebase on web and disables the Firebase Analytics integration for the current run.

Toolchain setup

This is a Flutter project, so install the Flutter SDK first and add the Flutter bin directory to your Windows PATH. That path provides both the flutter command and Flutter's bundled dart command.

Verify the toolchain before running project commands:

flutter --version
dart --version
flutter doctor

If dart pub get prints dart : The term 'dart' is not recognized, the SDK is not on PATH yet. For this project, prefer:

flutter pub get

If you use FVM, install it after Dart is available, then run Flutter commands through FVM:

dart pub global activate fvm
fvm install stable
fvm use stable
fvm flutter pub get

This project uses Melos for managing packages and development scripts.
Make sure you have Melos installed.

# Install Melos globally
dart pub global activate melos

# Optional: install Flutter with FVM
fvm install stable
fvm use stable

# Install dependencies & enable Git hooks
melos run init

#Install Husky
npm install husky --save-dev
Or
yarn add husky --dev

#Enable Enable Git hooks
npx husky install

# Run code generation
melos generate

# Run the app
fvm flutter run

About

Production-ready Flutter boilerplate built on the Stacked framework with essential tools preconfigured—Melos, FVM, Husky, Firebase, localization, linting, state management, database, and more—so you can skip setup and start building scalable, maintainable apps instantly.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors