core/reactive library

Classes

DerivedPod<T>
View
The simplest possible way to render reactive widgets. An exact alias for PodBuilder, aligning perfectly with the minimalist paradigm.

Functions

derive<T>(T compute()) WhalePod<T>
A computed state that derives its value from other reactive states. It automatically tracks dependencies and updates when they change.
mutate(void updates()) → void
Run multiple state updates in a single batch, triggering only one UI rebuild. Prevents redundant repaints when updating multiple tightly coupled states.
persistentState<T>(String key, T defaultValue) WhalePod<T>
The simplest way to declare automatically persisting state using SharedPreferences. It syncs changes asynchronously without halting the UI thread! Note: Call await WhaleStorage.init(); in main() before declaring!
set(void updates()) → void
Helper alias to batch mutations. Exactly the same as mutate.
state<T>(T initialValue) WhalePod<T>
The simplest way to declare state. Alias for creating a WhalePod. Example: final counter = state(0);

Typedefs

Controller = WhaleTank
Injector = Reef
ReactiveView = View
ReactiveWidget = PodBuilder
Signal<T> = WhalePod<T>
---- Standard Technical Naming Aliases ---- For developers who prefer standard framework conceptual naming:
Store = WhaleTank