Riverpod-style ergonomics with a smaller surface area.
miniriverpod keeps Provider and AsyncProvider familiar, while simplifying family, mutation, and lifecycle behavior for Flutter teams.
No Code Generation
family-like providers, overrides, and mutations are all implemented with plain Dart classes.
Unified Async Model
A single AsyncProvider handles Future and Stream, with strict cancellation on rebuild, invalidate, and dispose.
Built-in Concurrency
Mutation calls support concurrent, queue, restart, and dropLatest without external utilities.
Production Flow in Five Steps
The core package pattern is ProviderScope + Provider classes + ref.invoke for state updates.
Install
flutter pub add miniriverpod
Mutation + Invoke
class UserProvider extends AsyncProvider<User?> {
UserProvider() : super.args(null);
late final renameMut = mutation<void>(#rename);
Call<void, AsyncValue<User?>> rename(String name) => mutate(
renameMut,
(ref) async {
final api = ref.watch(apiProvider);
await api.rename(name);
ref.state = AsyncData(await api.me());
},
concurrency: Concurrency.restart,
);
}
// UI
await ref.invoke(userProvider.rename('Alice'));
Compatibility Note
miniriverpod intentionally keeps Provider + AsyncProvider + WidgetRef close to Riverpod, but replaces codegen-heavy patterns with subclass + args and explicit mutation calls.
Previous
Open SourceNext
Installation