Skip to main content

capybara_devtools_bloc 0.1.0 copy "capybara_devtools_bloc: ^0.1.0" to clipboard
capybara_devtools_bloc: ^0.1.0 copied to clipboard

Shows a Flutter app's blocs and cubits, with each event and change, in Capybara's State tab.

capybara_devtools_bloc #

Shows a Flutter app's blocs and cubits in Capybara's State tab: one store per instance, a bloc's changes named after the event that made them.

Works with bloc 9, next to capybara_devtools, which connects the app to Capybara.

Use #

void main() {
  Capybara.run(() {
    WidgetsFlutterBinding.ensureInitialized();
    Bloc.observer = CapybaraBlocObserver(parent: Bloc.observer);
    runApp(const MyApp());
  });
}

parent keeps the observer the app had: Capybara's passes every call on to it.

States show as their fields when they have toJson() (json_serializable, freezed) or Equatable's props, otherwise as their toString(); events show the same way under their type. A closed bloc shows as closed.

In release builds the observer only passes calls on to parent.

0
likes
160
points
454
downloads

Documentation

API reference

Publisher

verified publishercapybara.lhphuc.com

Weekly Downloads

Shows a Flutter app's blocs and cubits, with each event and change, in Capybara's State tab.

Homepage
Repository (GitHub)
View/report issues

Topics

#devtools #debugging #bloc #state-management #flutter

License

MIT (license)

Dependencies

bloc, capybara_devtools, flutter

More

Packages that depend on capybara_devtools_bloc