smf_bloc 0.3.0 copy "smf_bloc: ^0.3.0" to clipboard
smf_bloc: ^0.3.0 copied to clipboard

The SMF module that manages the state of screens with BLoC. It adds flutter_bloc to the Flutter app that SMF generates.

example/README.md

Generate a Flutter app with BLoC #

bloc is the module of the SMF CLI that manages the state of screens with BLoC. Choose it with -m:

dart pub global activate smf_flutter_cli
smf create my_app -m home,bloc --no-input

The module adds flutter_bloc to the pubspec.yaml of the app:

dependencies:
  flutter:
    sdk: flutter
  flutter_bloc: "^9.1.1"
  go_router: "^17.5.0"

go_router is there for the start screen. BLoC needs no widget around the app and no start-up code, so flutter_bloc is all the module adds. A feature that keeps state brings the Cubits or Blocs of its screens in its variant for bloc. The start screen home has no state, which is why this app gets only the package.

Without -m, smf create asks which module manages the state of the app, and offers riverpod and None as well. An app has at most one.

The documentation has more on the bloc module and on services and state.

0
likes
160
points
--
downloads

Documentation

Documentation
API reference

Publisher

verified publishersaymyframe.com

The SMF module that manages the state of screens with BLoC. It adds flutter_bloc to the Flutter app that SMF generates.

Homepage
Repository (GitHub)
View/report issues
Contributing

Topics

#flutter #architecture #state-management #bloc

License

Apache-2.0 (license)

Dependencies

smf_contracts

More

Packages that depend on smf_bloc