<img align="left" src="https://flutter-it.dev/images/main-logo.svg" alt="flutter_it logo" width="188" style="margin-left: -10px;"/>
<div align="right">
<a href="https://www.buymeacoffee.com/escamoteur"><img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy Me A Coffee" height="28" width="120"/></a>
<br/>
<a href="https://github.com/sponsors/escamoteur"><img src="https://img.shields.io/badge/Sponsor-❤-ff69b4?style=for-the-badge" alt="Sponsor" height="28" width="120"/></a>
</div>
<br clear="both"/>
# flutter_it
> 📚 **[Complete documentation available at flutter-it.dev](https://flutter-it.dev)**
> Explore comprehensive guides, examples, and best practices for the entire ecosystem!
**A convenience package that imports the entire flutter_it ecosystem in one go.**
> 🏗️ **This is the ideal starting point for implementing [Practical Flutter Architecture (PFA)](https://blog.burkharts.net/practical-flutter-architecture)** — a pragmatic, production-ready architecture that emphasizes simplicity, testability, and maintainability. The flutter_it packages provide all the building blocks you need.
Instead of adding four separate dependencies:
```yaml
dependencies:
get_it: ^9.0.0
watch_it: ^2.0.0
command_it: ^8.0.0
listen_it: ^5.3.0
```
Just add one:
```yaml
dependencies:
flutter_it: ^1.0.0
```
And import once:
```dart
import 'package:flutter_it/flutter_it.dart';
```
## What's Included
This package re-exports all four flutter_it packages:
- **[get_it](https://pub.dev/packages/get_it)** - Service locator and dependency injection
- **[watch_it](https://pub.dev/packages/watch_it)** - Reactive state management built on get_it
- **[command_it](https://pub.dev/packages/command_it)** - Command pattern with automatic loading/error states
- **[listen_it](https://pub.dev/packages/listen_it)** - ValueListenable operators and reactive collections
## The Construction Set Philosophy
**Important**: flutter_it is a **construction set** of independent packages, not a monolithic framework.
- Each package works **standalone**
- Packages are **independent** building blocks
- Use one or combine several - **you choose**
- Start with what you need, add more later
**You don't need all packages to use this import** - if you only use get_it and watch_it in your code, that's perfectly fine. The other packages are available when you need them.
## Quick Example
```dart
import 'package:flutter_it/flutter_it.dart';
// Use get_it for dependency injection
final getIt = GetIt.instance;
void setup() {
getIt.registerSingleton<ApiService>(ApiService());
}
// Use watch_it for reactive UI
class MyWidget extends WatchingWidget {
@override
Widget build(BuildContext context) {
final api = watchIt<ApiService>();
final data = watchValue((DataModel m) => m.value);
return Text('$data');
}
}
// Use command_it for async operations with loading states
final loginCommand = Command.createAsync<bool, LoginCredentials>(
(credentials) async => apiLogin(credentials),
initialValue: false,
);
// Use listen_it for ValueListenable operators
final filteredItems = itemsNotifier
.where((items) => items.length > 0)
.map((items) => items.take(10));
```
## When Should You Use Individual Packages?
If your project only needs one or two packages from the ecosystem (e.g., just get_it), you might prefer importing them individually to keep your dependencies minimal. This convenience package is ideal when:
- You're using multiple flutter_it packages
- You want to explore the ecosystem without managing multiple imports
- You prefer a single import for cleaner code
## AI-Assisted Development
flutter_it ships [Agent Skills](https://agentskills.io) for AI coding assistants
(Claude Code, Cursor, GitHub Copilot, Codex, Gemini CLI and others) in its `skills/` directory:
`flutter-it-overview`, `flutter-it-architecture`, `flutter-it-feed-datasource`,
`flutter-it-get-it`, `flutter-it-watch-it`, `flutter-it-command-it`, `flutter-it-listen-it`.
Install them into your project with the official Dart skills tool:
```bash
dart run skills@ get
```
If you depend on the individual packages instead of `flutter_it`, each of them ships its own
`<package>-expert` skill; the ecosystem-wide skills can be added from this repository:
```bash
dart run skills@ add flutter-it/flutter_it
```
[Learn more about AI skills →](https://flutter-it.dev/misc/ai_skills)
## Learn More
- **Documentation**: https://flutter-it.dev
- **Discord Community**: https://discord.gg/ZHYHYCM38h
For detailed guides on each package, visit the documentation site.
## Individual Package Links
- [get_it on pub.dev](https://pub.dev/packages/get_it) | [GitHub](https://github.com/flutter-it/get_it)
- [watch_it on pub.dev](https://pub.dev/packages/watch_it) | [GitHub](https://github.com/escamoteur/watch_it)
- [command_it on pub.dev](https://pub.dev/packages/command_it) | [GitHub](https://github.com/flutter-it/command_it)
- [listen_it on pub.dev](https://pub.dev/packages/listen_it) | [GitHub](https://github.com/flutter-it/listen_it)
## Sponsoring
If you find the flutter_it ecosystem useful, consider [sponsoring the development](https://github.com/sponsors/escamoteur/).
---
<div align="center">
<img src="https://github.com/flutter-it/flutter_it/blob/main/flutter_it.png?raw=true" alt="flutter_it logo" width="200"/>
</div>