get_light 1.0.0
get_light: ^1.0.0 copied to clipboard
Lightweight Flutter state management and dependency injection extracted from GetX. Includes reactive variables (.obs, Obx), simple state (GetBuilder, GetxController), DI (Get.put / Get.find / lazyPut) [...]
1.0.0 #
Initial release.
State management #
GetxControllerwithupdate()/update([ids])for targeted rebuildsGetBuilder<T>widget with auto-registration and lifecycle managementGetView<T>convenience base widget
Reactive state #
Rx<T>,RxInt,RxDouble,RxBool,RxStringreactive value typesRxList<E>,RxMap<K,V>,RxSet<E>reactive collection types.obsextension on any typeObxandObxValuewidgets for automatic reactive rebuilds
Dependency injection #
Get.put— eager singleton registrationGet.lazyPut— deferred singleton (created on firstfind)Get.create— factory registration (new instance perfind)Get.find/Get.findOrNullGet.delete/Get.deleteAllGet.replace— swap a registered instanceGet.reload/Get.reloadAllGet.isRegistered/Get.isPreparedtagsupport for multiple instances of the same typeGetxService— permanent service mixin (survivesdeleteAll)
Workers #
ever— fires on every value changeonce— fires once when the condition is metinterval— rate-limits to at most once per durationdebounce— fires after a period of silenceWorkersutility class for bulk disposal
Lifecycle #
GetLifeCycleMixinwithonInit,onReady,onClose,onDeleteonReadyis called one frame afteronInitviaSchedulerBinding.addPostFrameCallback