Skip to main content

zero_state 1.0.0 copy "zero_state: ^1.0.0" to clipboard
zero_state: ^1.0.0 copied to clipboard

Next-generation Flutter state management with 120Hz Element-Bypass rendering, speculative intent prefetching, background isolate graphs, A2UI, and LWW-CRDT.

1.0.0 #

Initial stable public release of Zero (package:zero_state/zero_state.dart) by RedLight Apps (redlightapps.com — Yusuf Kaval).

Core Reactive Ecosystem #

  • ZeroCell<T> & DerivedCell<S, R> (select): Epoch-versioned reactive cells with automatic lazy subscription management, stale-read prevention when unsubscribed, and in-flight request deduplication (fetchDeduped) with ABA race protection.
  • ZeroComputed & ZeroBatch & ZeroEffect: Diamond-glitch-free topological depth propagation (combine2, combine3, combineList), atomic batch transactions (ZeroBatch.run), and side-effect runners with infinite-loop protection.
  • Declarative UI Widgets & Context Extensions: Pure widgets.dart components (ZeroBuilder, ZeroListener, ZeroConsumer, ZeroSelector, ZeroMultiListener), hierarchical dependency injection (ZeroScope with cells, cellFactories, keyedCells, and overrides), and ergonomic BuildContext extensions (context.read<C>(), context.watch<C>(), context.select<C, R>()).
  • Async & Lifecycle Utilities: ZeroResourceCell<T> (with exponential backoff retry and refresh()), ZeroFutureCell<T>, ZeroStreamCell<T>, ZeroHistoryCell<T> (undo/redo stack), ZeroHydratedCell<T> (storage persistence), ZeroFamily<Arg, T> (parameterized cells with TTL auto-dispose), ZeroDebouncer, ZeroThrottler, ZeroObserver, and ZeroList<E>.

The 5 Next-Generation Architectural Pillars #

  • Pillar 1 — Element-Bypass Rendering (0 Widget Rebuilds):
    • ZeroPaintSurface<T>: Binds a ZeroCell<T> directly to a custom RenderBox (markNeedsPaint()) with throttled accessibility semantics.
    • ZeroLayerBypass<T>: Mutates TransformLayer and OpacityLayer handles directly on the compositor tree without rebuilding child widgets.
    • ZeroShaderSurface<T> & ZeroShaderUniformBridge<T>: Pre-allocated zero-GC Float32List uniform buffers bound directly to Impeller FragmentShader instances at 120Hz.
  • Pillar 2 — Tri-Modal Speculative Intent & Network Coalescing:
    • TriModalIntentTracker: Desktop pointer velocity/cosine trajectory analysis, mobile 100ms touch-down lead window with scroll cancellation, ballistic scroll landing prediction, and 1st-order Markov transition matrices protected by an anti-429 Token Bucket rate limiter.
    • ShadowStateCache<K, V>: TTL-bounded off-tree speculative cache with 0ms promotion (promoteToCell).
    • DeterministicRequestCoalescer & FrameBatchCoalescer<K, V>: Range subsumption ([offset, offset + limit]) and DataLoader-style time-window key batching.
  • Pillar 3 — Autonomous Background Isolate Graph:
    • AutonomousIsolateGraph & ZeroGenericIsolateGraph<P, S>: Persistent background worker isolates on native platforms (with Web fallback) transferring binary Float32List buffers in $O(1)$ time via TransferableTypedData.
  • Pillar 4 — A2UI Context & Telemetry Decision Graph:
    • ContextDecisionGraph<T> & ZeroA2UiTopologyHost<T>: Automatic SchedulerBinding FrameTiming ingestion and zero-allocation sealed UI topology switching (HighFrequencySurfaceTopology, RichInteractiveGridTopology, DegradedCompactListTopology, RecoveryActionTopology).
  • Pillar 5 — Incremental $O(1)$ HLC-CRDT & Optimistic Rollback:
    • HlcClock & HlcTimestamp: Monotonic Hybrid Logical Clocks with configurable maxDriftMs clock-poisoning guard.
    • ZeroLwwCrdtStore<K, V> & CrdtPersistenceAdapter<K, V>: $O(1)$ incremental Last-Write-Wins Element-Set CRDT store with lazy snapshot materialization, per-key watchKey(K) reactive cells, delta-patch sync, tombstone garbage collection, and disk hydration.
    • OptimisticTransactionManager<T>: Instantaneous optimistic UI mutations with overlapping transaction safety and automatic authoritative rollback on server failure.
0
likes
160
points
508
downloads

Documentation

Documentation
API reference

Publisher

unverified uploader

Weekly Downloads

Next-generation Flutter state management with 120Hz Element-Bypass rendering, speculative intent prefetching, background isolate graphs, A2UI, and LWW-CRDT.

Homepage
Repository (GitHub)
View/report issues

Topics

#state-management #reactive #impeller #crdt #architecture

Funding

Consider supporting this project:

buymeacoffee.com
github.com
github.com

License

MIT (license)

Dependencies

flutter

More

Packages that depend on zero_state