reactivity library
Redus Flutter Reactivity - Vue-like reactive widgets and lifecycle hooks.
Import this for just the reactivity functionality:
import 'package:redus_flutter/reactivity.dart';
Or import everything via:
import 'package:redus_flutter/redus_flutter.dart';
Classes
-
Observe<
T> - A widget that observes a reactive source and rebuilds when it changes.
- ObserveEffect
- A widget that auto-tracks reactive dependencies and rebuilds when they change.
-
ObserveMultiple<
T> - A widget that observes multiple reactive sources and rebuilds when any change.
- ReactiveContext
- Manages the relationship between Flutter Elements and ReactiveEffects.
-
ReactiveState<
T extends ReactiveWidget> - Base State class for ReactiveWidget.
- ReactiveWidget
- A StatefulWidget with reactive State that supports custom Flutter mixins.
Enums
- LifecycleTiming
- Timing for lifecycle hooks - before or after the lifecycle method.
Mixins
- LifecycleCallbacks
- Base mixin providing lifecycle callback storage and registration.
-
LifecycleHooksStateMixin<
T extends StatefulWidget> - Mixin providing lifecycle hooks for State classes.
-
ReactiveStateMixin<
T extends StatefulWidget> - Mixin providing automatic reactivity for State classes.
Extensions
-
ComputedWatchExtension
on Computed<
T> - Extension to watch Computed values with automatic Element rebuild.
-
RefWatchExtension
on Ref<
T> - Extension to watch Ref values with automatic Element rebuild.
Typedefs
-
DidUpdateWidgetCallback<
T> = void Function(T oldWidget, T widget) - Callback type for didUpdateWidget - receives oldWidget and current widget.
- ErrorCallback = bool? Function(Object error, StackTrace stack)
- Callback type for error handling.
- LifecycleCallback = void Function()
- Callback type for lifecycle hooks.