lively 1.1.0
lively: ^1.1.0 copied to clipboard
Zero-boilerplate reactive Flutter widgets via code generation.
1.1.0 #
AsyncValue<T>sealed type — newAsyncLoading<T>,AsyncData<T>, andAsyncError<T>classes shipped in the runtime and exported fromlively.dart. Used as the state type forFuture<T>andStream<T>fields generated by the companion generator.@computedannotation — annotate a getter to opt into lazy cached computation. The generator wires dirty tracking so the value is recomputed at most once per reactive mutation cycle.
1.0.2 #
- Fix: abstract classes are no longer candidates for proxy generation. Fields typed as abstract classes (e.g.
Widget,Listenable) and collection element/key/value types that are abstract now fall back to plain reactive scalars or unwrappedLiveList/LiveSet/LiveMap— preventing compile errors from unimplemented abstract members in the generated_Live<ClassName>subclass.
1.0.1 #
- Patch release — dependency and tooling bumps.
1.0.0 #
- Initial release.
@Live()annotation generates a thinStatefulWidget, an abstractStatebase with microtask-batchedsetState, and a concrete impl that wires reactive setters.@LiveStore()annotation generates a reactiveChangeNotifierfrom a plain Dart class. Prefix the spec class with_; the generator strips the underscore to produce the public class (e.g._CartStore→CartStore).- Reactive scalar fields: every mutable field gets a setter that schedules a batched rebuild /
notifyListeners()viaFuture.microtask. Multiple assignments in one sync block produce exactly one notification. late finalfields without an initializer become typed constructor parameters — on the generated widget for@Live(), or on the generated store class for@LiveStore().didUpdateWidgetis generated automatically for widget params.- Known disposable types (
TextEditingController,AnimationController,FocusNode,ScrollController,PageController,StreamController,StreamSubscription) are disposed/cancelled automatically. Nullable fields use?.in all generated lifecycle calls. ChangeNotifierfields are wired withaddListener/removeListenerand re-wired on reassignment.@LiveStore-typed fields with inline initializers are additionally auto-disposed (widget owns them).- Deep object reactivity via generated
_Live<ClassName>proxy subclasses; proxy setters re-wrap incoming values so reactivity is never lost on reassignment. LiveList<T>,LiveSet<T>,LiveMap<K, V>reactive collection wrappers with optional item-level proxy wrapping.notify()escape hatch for manual rebuild /notifyListeners()scheduling.Reactivewidget for surgical subtree rebuilds.