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

The SMF module that manages the state of screens with Riverpod. It adds flutter_riverpod and its ProviderScope to the Flutter app that SMF generates.

example/README.md

Generate a Flutter app with Riverpod #

riverpod is the module of the SMF CLI that manages the state of screens with Riverpod 3, without code generation. Choose it with -m:

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

The module adds flutter_riverpod to the pubspec.yaml of the app, and a ProviderScope around the root widget in lib/main.dart:

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await bootstrap();
  runApp(ProviderScope(child: const App()));
}

A feature that keeps state brings the providers of its screens in its variant for riverpod. The start screen home has no state, so this app has no providers yet.

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

The documentation has more on the riverpod 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 Riverpod. It adds flutter_riverpod and its ProviderScope to the Flutter app that SMF generates.

Homepage
Repository (GitHub)
View/report issues
Contributing

Topics

#flutter #architecture #state-management #riverpod

License

Apache-2.0 (license)

Dependencies

smf_contracts

More

Packages that depend on smf_riverpod