flutter_super
1.4.10, released 2 years ago by drdejavu.ng
Reactive state management framework with built‑in dependency injection for Flutter.
WASM-ready
What it does
Super provides RxNotifier, RxCollections and widget helpers like SuperBuilder and SuperConsumer to build reactive UIs. It also offers a lightweight DI system via Super.init and Super.create.
AI-written summary of version 1.4.10, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need a simple, MVVM‑style state management solution without code generation.
- You want to inject services globally and mock them easily in tests.
- You prefer a declarative UI that rebuilds only on state changes.
- You want built‑in testing utilities like super_test.
Skip it when
- You already use a mature state manager like Riverpod, Bloc or GetX.
- You need advanced features such as complex navigation or backend integrations that Super does not cover.
Strengths
- Zero boilerplate for reactive state and DI.
- Built‑in testing support with super_test.
- Lightweight and easy to integrate into existing projects.
- Supports auto‑dispose for individual dependencies.
Weaknesses
- Limited ecosystem compared to Riverpod or Bloc.
- No built‑in navigation or backend clients.
- Documentation is concise but may need deeper exploration for advanced use cases.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
Add dependency in pubspec, wrap root with SuperApp, use Super.init for services.
```dart
import 'package:flutter_super/flutter_super.dart';
void main() => runApp(const SuperApp(child: MyApp()));
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) => const MaterialApp(home: HomeView());
}
final counter = Super.init(CountNotifier());
class CountNotifier extends RxNotifier<int> {
@override
int initial() => 0;
void increment() => state++;
}
class HomeView extends StatelessWidget {
const HomeView({super.key});
@override
Widget build(BuildContext context) => Scaffold(
body: Center(
child: SuperBuilder(builder: (_) => Text('${counter.state}')),
),
floatingActionButton: FloatingActionButton(onPressed: counter.increment),
);
}
```Alternatives
Packages that do the same job and could replace flutter_super.
Works with
Packages commonly used together with flutter_super: ones it builds on, ones built on it, and its own family.