getx_distil 1.4.4
getx_distil: ^1.4.4 copied to clipboard
A distilled, high-performance micro-state management and scoped DI engine for Flutter.
1.4.4 #
- Documentation: Rewrote the README pitch in both
README.mdandREADME.ko.mdso the package is not framed as a thin GetX fork. Opening and Why sections now lead with widget-tree ownership,WeakReferencelookup / zombie-safe teardown, collection microtask batching, and theNotifier.isTrackingread fast-path.
1.4.3 #
- Jaspr Port Pointer: Linked
jaspr_getx_distilfrom bothREADME.mdandREADME.ko.md— the same contracts ported to the JasprComponenttree.
1.4.2 #
- Example Architecture: Restructured the example app to Feature-First + MVVM (
core//models//services//views/). EachGoRouteowns a screen-scopedBindingWidget; app-lifetime objects stay inGetMaterialApp.bindings. - Recommended REST Stack: The TDD screen now demonstrates
dio+retrofit+freezed(DTO → client → repository → Controller) withBindingWidgetmock overrides. - Architecture Docs: Added
example/AGENTS.mdand an "App architecture" section in both package READMEs so the example layout can be copied into an app's agent rules.
1.4.1 #
- Documentation Rewrite: Rewrote
README.mdandREADME.ko.mdaround feature ownership, hybrid DI (global + tree-scoped), widget-tree lifetime, and View–Controller composition. - LICENSE Recognition: Restored the standard MIT license wording so pub.dev can detect the license (previously shown as unknown).
1.4.0 #
⚠️ Breaking Changes #
Get.finduses named parameters (GetX-styletag:):Get.find<T>(context)→Get.find<T>(context: context),Get.find<T>(null, 'tag')→Get.find<T>(tag: 'tag'). Tags remain a global-registry-only concept: a tagged lookup resolves fromGet.put(tag:)registrations and skips scoped DI by design (scoped instances are identified by type + widget-tree position, never by a string).- Seeded
RxS/RxSListstart asloaded:RxS(value)with a non-null value andRxSList([...])/[...].opswith a non-empty list start inloaded. Empty/null initial data still startsidle. Rx.updateSequentialno longer swallows errors: an exception insideactioncompletes the returned future with that error (anawaitrethrows; fire-and-forget surfaces as an unhandled Zone error). PassonError:to handle it in place. Errors are still forwarded to attached stream consumers (ever(onError:),listen), but only when one exists — no moreaddErrorinto an empty broadcast stream.Get.putreplaces a pending lazy factory: when the key only holds an un-instantiatedlazyPutbuilder, the provided instance is registered instead of calling the old factory. A live instance is still preserved (singleton behaviour unchanged).
✨ New #
RxS.load()/RxSList.load()/RxSList.loadMore(): one-line async loading that drivesidle → loading → loaded/empty/errorautomatically. Errors are captured into the status (the future never throws), previous data is preserved on failure, overlapping calls follow last-write-wins so stale responses are discarded, and errors are forwarded toever(onError:)Workers.loadMore()appends a page without switching toloadingand updateshasMore.GetBuilder<T>widget withid,init,global,tag,autoRemove,initState,dispose. Resolves controllers through the hybridGet.find(context:, tag:)lookup, so it works withBindingWidgetscopes as well as the global registry.GetxController.update(ids)honours ids:update()notifies global listeners,update(['x'])notifies only listeners registered viaaddListenerId('x', …). Addedrefresh(),refreshGroup(id),addListenerId,removeListenerId,disposeId,hasListeners.RxMap<K, V>andRxSet<E>with the same dirty-flag microtask batching,Notifier.isTrackingread fast-path and Worker compatibility asRxList.Map.obs/Set.obsextensions,assignAll,rawMap/rawSet. Shared batching logic extracted into theRxBatchNotifiermixin.- Workers:
interval(rate-limit, first value per window),everAll(multiple observables),ever(onError:).GetListenable.bindStream(stream)drives any observable from aStream; subscriptions are cancelled onclose()orunbindStreams(). Get.lazyPut(fenix: true)now works:Get.deletedisposes the instance (onCloseruns) but keeps the builder registered, so the nextfindre-creates it.Get.reset(clearFactory: false)keeps lazy/fenix builders. AddedGet.isPrepared<T>().
🛠️ Fixed #
- Context-less
Get.find<T>()ambiguity: live scoped instances are always preferred over instantiating a binding in another activeBindingWidget; instantiation only happens when no live instance exists. When several live instances or several declaring scopes match the same type, the most recent one is used and a one-time debug warning tells you to passcontext:so the widget tree decides. AddedBindingWidgetState.liveInstanceCount<T>()for diagnostics.
1.3.2 #
- TDD Documentation & Example: Added comprehensive TDD (Test-Driven Development) documentation in both
README.mdandREADME.ko.md, covering mock service injection patterns withGetxServiceandBindingWidget. Includes a full example app (tdd_test_page.dart,tdd_test_controller.dart) and a corresponding widget test suite (tdd_example_test.dart) demonstrating how to write testable controllers with injectable mock services.
1.3.1 #
GetMaterialAppRoot Service Auto-Initialization: Global services registered viabindingsinGetMaterialAppare now automatically initialized at app startup. Previously, services such asGetxServicesubclasses required a manualbuildercallback workaround (Get.find<T>(context)) to trigger initialization; this is no longer necessary.BindingWidgetInstant Initialization Support:BindingWidgetnow supports immediate binding initialization at mount time, enabling parent-scoped services to be fully ready before any child widget builds.
1.3.0 #
- Idle State Support for RxS & RxSList: Introduced a new
idlestatus in bothRxSandRxSList, representing the initial state before any loading or data operation begins. This enables more precise UI branching for lazy-initialized or pre-fetch scenarios. - Nullable Error Message Support: Updated
RxS.setError()andRxSList.setError()to accept nullable error messages, providing greater flexibility when error details are optional. - Null Error Message Handling: Fixed widget builders in both
RxSandRxSListto gracefully handle null error messages without crashing.
1.2.1 #
- Correction of Localization API Usage in Documentation: Updated runtime localization examples in both
README.mdandREADME.ko.mdto use the reactiveGet.localesetter property instead of the deprecatedGet.updateLocalemethod.
1.2.0 #
- Localization Documentation Refinement: Updated localization examples in both
README.mdandREADME.ko.mdto cover two distinct use cases:GetViewpages:build()is auto-wrapped byGetViewElementwith aNotifiertracking scope, so.trcalls directly insidebuild()automatically subscribe toGet.locale(Rx)without needingObx.StatelessWidget/StatefulWidgetpages: No tracking scope exists, so the entireScaffoldmust be wrapped with a singleObxto make all.trcalls reactive.
- Documentation Clarity: Added a
[!TIP]admonition recommending a single top-levelObxwrappingScaffoldfor concise StatelessWidget localization.
1.1.4 #
- Introduced
Get.updateLocale: Added a new static methodGet.updateLocale(BuildContext context, Locale val)that dynamically updatesGet.localeand safely refreshes the activeGoRouterconfiguration (without a compile-time dependency ongo_router) to immediately apply translations on the current screen without resetting navigation or widget states. - Avoided Const Optimization Issues: Updated localization guides in both
README.mdandREADME.ko.mdto recommend usingupdateLocaleand removingconstfrom page-level router builders to guarantee UI updates when reloading routes.
1.1.3 #
- Fixed Sticky Error Status: Resolved an issue in both
RxSListandRxSwhere theerrorstate was sticky and failed to transition back toloadedoremptywhen subsequent data mutations or reload attempts occurred.
1.1.2 #
- Documentation Reordering: Moved
RxSListandRxSsections higher in bothREADME.mdandREADME.ko.mdto be sections 2 and 3 under Quick Start, reflecting their core importance. - Markdown Formatting Polish: Added newlines between item titles and descriptions under the "Core Enhancements" section for a cleaner layout.
- HTML/Markdown Parser Warning Fix: Escaped the angle brackets
<T>in theRxSListclass documentation to ensure perfect parser compatibility.
1.1.1 #
- Reactive Error Messages in RxS & RxSList: Refactored the
errorproperty in bothRxSandRxSListto be reactive using an underlyingRxn<String>backing variable while maintaining the standardString?getter/setter API. - Declarative Error Branch Reactivity: Wrapped the
errorwidget builder branch in the.on()extension withObxto automatically rebuild the UI whenever the error message changes. - Testing Suite Upgrades: Expanded widget and unit tests in
getx_distil_test.dartto verify that dynamic mutations to the error message update the rendering tree instantly.
1.1.0 #
- RxS<T> — Status-Aware Single Value: New [
RxS] class extending [Rxn] that carries its ownloading/loaded/errorstatus. Value mutations auto-sync toloaded; error state is sticky. Includes.opsextension forT → RxS<T>conversion and.on()widget builder for declarative UI branching. - RxSList, RxS Enhancements: Added core enhancements documentation in README for both
RxSList(status-aware list) andRxS(status-aware single value). - Example App — RxS Demo Page: New RxS controller (
RxSController) and page (RxSPage) demonstrating loading, updating, null-setting, error simulation, and reset. - README & Documentation: Added section 9 "Status-Aware Single Value (
RxS)" with full usage guide, status auto-sync rules, UI binding patterns, and nullable convenience. Updated Core Enhancements list.
1.0.4 #
- update homepage
1.0.3 #
- Obx Missing Rx Warning: Converted the
Obxmissing reactive variable exception to a debug warning to avoid unnecessary crashes. - BindingWidget Documentation Refinement: Documented
BindingWidget's core design goal of isolating controllers for concurrent multi-instance child views. - Expanded Rx Examples: Added comprehensive documentation for various Rx types (primitives, nullables, collection auto-batching, custom objects) to READMEs.
1.0.2 #
- GetView Memory Leak Resolution: Overrode the
updatelifecycle inGetViewElementto clear theExpandobuild context reference of the old widget, preventing unmounted element trees from leaking. - Enhanced Testing Support: Promoted
GetView.contextsto testing-visible API (@visibleForTesting) and added comprehensive test cases verifying resolution, update, and unmount lifecycles.
1.0.1 #
- Context-less Lookup via Weak References: Supported context-less
Get.find<T>()fallback for widget tree-scoped controllers by storing weak references in a static registry (_weakRegistry). - Memory Safety & Zombie Prevention: Automated explicit unregistration inside
BindingWidgetState.dispose()to ensure GC timing does not return dead/zombie controllers, preventing memory leaks. - Disposal Sequence Safe Teardown: Updated disposal order to invoke all controllers'
onDelete()hooks first before removing them from the weak registry, enabling safe cross-controller lookups during onClose/destruction.
1.0.0 #
- Initial Stable Release of
getx_distil! - Core Micro-State Management: Ultra-lightweight reactive state (
.obs,Obx) engineered for maximum rendering precision and zero overhead. - 100% Tree-Scoped DI Stack (
BindingWidget): Native Flutter widget-tree synchronized dependency lifecycle with automated garbage collection (Auto-GC). - Self-Healing Build-Phase Engine: Automatically defers state mutations triggered during Flutter's build/layout phases to safe post-frame queues to prevent rendering crashes.
- Strict Async Obx Verification: Instantly flags hazardous
async/awaitanti-patterns insideObxbuilders and throws helpfulFlutterErrorguides. - FIFO Sequential Pipeline (
updateSequential): High-frequency sequential event queue that enforces race-free reactive state ordering. - RxList Microtask Batching: Automatically throttles consecutive loop updates into a single microtask frame, unlocking extreme rendering performance for bulk list mutations.
- Interactive Localization System (
Translations,tr,trArgs): Advanced, reactive multi-language translation bindings with parameter injection support. - High-Visibility Contextual DI Debugging: Provides precise parent ancestor path traces and active registry dumps when resolving services fails.