maac_mvvm_with_riverpod 0.2.1
maac_mvvm_with_riverpod: ^0.2.1 copied to clipboard
maac_mvvm_with_riverpod is an extension package of maac_mvvm that is used with RiverPod.
maac_mvvm_with_riverpod #
An extension package that integrates MAAC's lifecycle management with the Riverpod state management library.
🚀 Key Features #
- ConsumerViewModelWidget: A widget that combines
ViewModelWidgetwith Riverpod'sWidgetRef. - RiverViewModel: A base ViewModel class that is designed to hold and manage Riverpod state.
📖 Usage #
1. Define your ViewModel with Riverpod state #
class MyViewModel extends RiverViewModel<MyState> {
MyViewModel({required super.uiState});
}
2. Use ConsumerViewModelWidget #
class MyPage extends ConsumerViewModelWidget<MyViewModel> {
@override
ProviderListenable<MyViewModel> viewModelProvider() => myViewModelProvider;
@override
Widget buildWidget(BuildContext context, WidgetRef ref, MyViewModel viewModel) {
return Text('ViewModel integrated with Riverpod');
}
}
🧭 Documentation #
For detailed API specifications, installation guides, and tutorials, please visit our centralized documentation hub:
Specific Guides: #
🤝 Contributing #
Contributions are welcome! Please visit the main repository for more information.