Last updated:
0 purchases
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
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.