maac_mvvm_with_get_it
An extension package that integrates MAAC with GetIt, allowing for automatic ViewModel resolution and dependency injection.
🚀 Key Features
- DependencyViewModelWidget: A widget that resolves its own ViewModel from GetIt.
- Factory Scoping: Simplified ViewModel registration and lifecycle-aware resolution.
📖 Usage
1. Register your ViewModel
void setup() {
registerViewModel(() => MyViewModel());
}
2. Use DependencyViewModelWidget
class MyPage extends DependencyViewModelWidget<MyViewModel> {
@override
Widget build(BuildContext context, MyViewModel viewModel) {
return Text('ViewModel is automatically resolved from GetIt');
}
}
🧭 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.