flutter_causality

Last updated:

0 purchases

flutter_causality Image
flutter_causality Images
Add to Cart

Description:

flutter causality

flutter_causality #


Motivation #
I wanted to provide some convenience extensions for using causality with
Flutter.
Supported Features #

✅ Put a causality universe widget in the wigdet tree
✅ Put an effect widget in the widget tree to observe causes

Installation #
As simple as dart pub add flutter_causality.
Or manually add flutter_causality: ^<version> to your pubspec.yaml.
Examples #
runApp(
CausalityUniverseWidget(
causalityUniverse: causalityUniverse,
child: MaterialApp(
home: Scaffold(
body: EffectWidget(
builder: (cause) => switch (cause) {
ViewModelUpdatedCause _ => Center(
child: Text(cause.viewModel.data ?? ''),
),
_ => const Center(
child: CircularProgressIndicator(),
),
},
observedCauseTypes: const [
ViewModelUpdatedCause,
],
),
),
),
),
);
copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.