flutter_it
2.2.0, released 2 months ago by flutter-it.dev
Re-exports get_it, watch_it, command_it, and listen_it for a single import.
WASM-ready
What it does
Provides a convenience package that bundles the flutter_it ecosystem: get_it for DI, watch_it for reactive state, command_it for command pattern, and listen_it for ValueListenable utilities. Importing it gives access to all four libraries without adding each separately.
AI-written summary of version 2.2.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need both DI and reactive state management from the flutter_it ecosystem
- You want a single import to explore multiple flutter_it packages
- You prefer the practical Flutter Architecture approach
Skip it when
- You only need one of the underlying packages and want to keep dependencies minimal
- You prefer a different state‑management or DI solution
Strengths
- One‑stop import for four related packages
- Works with the Practical Flutter Architecture pattern
- All packages are kept up‑to‑date together
Weaknesses
- Adds all four dependencies even if only some are used
- May be larger than importing individual packages
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 4
import 'package:flutter_it/flutter_it.dart';
final getIt = GetIt.instance;
void setup() {
getIt.registerSingleton<ApiService>(ApiService());
}
class MyWidget extends WatchingWidget {
@override
Widget build(BuildContext context) {
final api = watchIt<ApiService>();
final data = watchValue((DataModel m) => m.value);
return Text('\$data');
}
}Alternatives
Packages that do the same job and could replace flutter_it.
Works with
Packages commonly used together with flutter_it: ones it builds on, ones built on it, and its own family.
- get_itflutter_it depends on itA fast, type-safe service locator for Dart and Flutter without BuildContext or code generation.
- watch_itflutter_it depends on itState management powered by get_it to observe changes and rebuild widgets automatically.
- listen_itflutter_it depends on itValueListenable operators and reactive collections for Flutter and Dart
- command_itflutter_it depends on itWrap sync and async functions as callable Command objects with reactive state.