riverpod_devtools 0.3.0
riverpod_devtools: ^0.3.0 copied to clipboard
DevTools extension for Riverpod - inspect and monitor your providers in real-time.
riverpod_devtools #
A DevTools extension for Riverpod - inspect and monitor your providers in real-time.
Features #
- Provider Graph: Visualize the relationships between your providers correctly (Coming soon!).
- State Inspector: View the current state of your providers.
- Event Log: Track provider lifecycle events (add, update, dispose).
- History Tracking: Jump back in time to see previous states.
Getting started #
-
Add
riverpod_devtoolsto yourpubspec.yaml:Run the command:
flutter pub add riverpod_devtoolsOr manually add it:
dependencies: riverpod_devtools: ^0.3.0 flutter_riverpod: ^2.6.1 # or ^3.0.0 - both are supportedNote: This package supports both Riverpod 2.x and 3.x. This package is currently in early development.
-
Add
RiverpodDevToolsObserverto yourProviderScope:While the DevTools extension is automatically detected, you must add the observer to enable communication between your app and the DevTools.
import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:riverpod_devtools/riverpod_devtools.dart'; void main() { runApp( ProviderScope( observers: [ RiverpodDevToolsObserver(), ], child: MyApp(), ), ); }
Usage #
- Run your Flutter app.
- Open semantic DevTools (open the debugger).
- Look for the "Riverpod" tab in DevTools.
- Interact with your app and watch the events and state updates in the DevTools tab.
Additional information #
- Repository: https://github.com/yutsuki3/riverpod_devtools
- Issues: https://github.com/yutsuki3/riverpod_devtools/issues
Contributions are welcome!
License #
This package is released under the MIT License. See LICENSE for details.