drip_flutter 0.3.0-alpha
drip_flutter: ^0.3.0-alpha copied to clipboard
Flutter render layer for DRIP — direct RenderObject binding with zero widget rebuilds.
Unreleased #
0.3.0-alpha - 2026-05-15 #
Added — Node System #
DripNode— abstract feature module with an ownedDripScope. Extend to create a named, scoped business-logic unit. All state, computed values, and effects are automatically disposed when the node is disposed.DripNode.register<T>/DripNode.resolve<T>— scoped dependency injection. Singleton by default; no global service locators.DripNodelifecycle:onInit,onDispose,onBackground,onForeground.DripNodeProvider<N>—StatefulWidget+InheritedWidgetthat creates a node on mount, forwards app-lifecycle events, and disposes it on unmount. Uses aBuilderchild to ensure the context passed tobuildersits below theInheritedWidgetsocontext.node<N>()resolves correctly.DripRouteNode—DripNodesubclass with route-lifecycle hooks (onRouteEnter,onRouteLeave). Integrates with Flutter'sRouteObserver.BuildContext.node<N>()/BuildContext.maybeNode<N>()— ergonomic node lookup extensions.
Added — List System #
DripList<T>— reactive list with item-level subscriber granularity. Updating indexinotifies only the subscriber registered for indexi.DripListView<T>— list widget that rebuilds only the tile at the changed index. Structural changes (add/remove) trigger a minimal list-level rebuild.
Fixed #
DripNodeProvider.of()now injects the actual runtime type name$Nin the missing-provider error message (was$Nas a literal string due to escaped interpolation).DripNodeProvider.buildercontext now correctly resolves its ownInheritedWidgetby wrapping the child in aBuilder.
Architecture #
DripValue<T>interface introduced indrip_core— shared readable/subscribable contract implemented by bothDripState<T>andDripComputed<T>. All Flutter render widgets now acceptDripValue<T>, allowing computed values to be passed directly without casting.DripListener/ListenerSubscribermoved todrip_state_base.dartto be accessible package-wide without importing implementation files.DripNodeis pure Dart — fully unit-testable without a Flutter widget tree.
Testing (drip_flutter) #
drip_node_test.dart— 20+ tests coveringDripNodelifecycle,register/resolve, effects, and disposal.drip_node_provider_test.dart— 8 tests covering mount/unmount, lifecycle forwarding,Provider.of,context.node, error messages, and nested providers.drip_route_node_test.dart— route lifecycle integration tests.drip_list_test.dart— 10 tests coveringadd,removeAt,[]=,insert,replaceAll,update,dispose.drip_list_view_test.dart— 8 tests including a 10,000-item single-tile-rebuild benchmark.
0.2.0-alpha - 2026-05-13 #
First release of drip_flutter — the Flutter direct render binding layer.
Added #
DripBinding<T>— liveRenderObjectsubscriber. Applies state changes directly to render properties, bypassing the widget/element rebuild cycle.DripText— zero-rebuild text widget. BindsDripValue<String>toRenderParagraph.textviamarkNeedsLayout().DripOpacity— zero-rebuild opacity widget. BindsDripValue<double>(clamped[0.0, 1.0]) viamarkNeedsPaint().DripColor— zero-rebuild background color binding viamarkNeedsPaint().DripTransform— zero-rebuildMatrix4transform binding viamarkNeedsPaint().DripImage—ImageProviderbinding with async image resolution.DripCustomBinding<T>— abstract base class for customRenderObjectbindings.DripFrame<T>/DripFrameBuilder<T>— controlled rebuild boundary for deliberate structural updates.
Performance #
- Verified: 1,000 simultaneous
DripStatewrites → 0 widgetbuild()calls. - Demo app
demo_grid: 1,000-cell live grid at 60 fps, zero rebuilds.
Architecture #
- Invariant 2 enforced: zero
setState()calls in binding code path. - Invariant 7 enforced: all bindings deregistered in
didUnmountRenderObject.