A predictable state management library that helps implement the BLoC design pattern.
| Package | Desc | Pub |
|---|---|---|
| flowr_dart | Base FlowR library for pure Dart. Core logic for state and concurrency. | |
| flowr | MVVM State Management for Flutter. Adds FrViewModel, FrView, and Providers. | |
| fr_mvvm_env | Environment management (Dev/Staging/Prod) with built-in Dropdown UI. | |
| fr_mvvm_locale | Localization management with built-in Switch UI and easy context extensions. | |
| fr_mvvm_theme | Theme switching with ThemeExtension helpers, image scheme parsing, and JSON color conversion. | |
| fr_mvvm_user | User session/profile management with built-in Dropdown UI. |
| Package | Desc | Pub |
|---|---|---|
| efficient_dio_logger | Dio interceptor for large-request projects with single-line JSON logging and automatic truncation for oversized values. | |
| drift_duckdb | A drift database implementation for DuckDB, allowing you to use DuckDB as a backend for drift. |
This repository ships local agent skills for FlowR Dart usage, Flutter MVVM
usage, and contract-first MVVM page scaffolding. See
skills/README.md for the available skills and usage
examples.
dart pub add flowrclass CounterModel {
final int value;
const CounterModel(this.value);
CounterModel copyWith({int? value}) => CounterModel(value ?? this.value);
}
class CounterViewModel extends FrViewModel<CounterModel> {
CounterViewModel() : super(const CounterModel(0));
void increment() => update((old) => old.copyWith(value: old.value + 1));
}
final counterVm = CounterViewModel();
FrStreamBuilder(
vm: counterVm,
stream: (vm) => vm.stream,
builder: (context, snapshot) {
final value = snapshot.data?.value ?? 0;
return Column(
children: [
Text('$value'),
ElevatedButton(
onPressed: counterVm.increment,
child: const Text('Increment'),
),
],
);
},
);Runnable example: main_mvvm.dart
fvm flutter run examples/example/lib/main_mvvm.dart