get_light 1.0.1 copy "get_light: ^1.0.1" to clipboard
get_light: ^1.0.1 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 #

  • GetxController with update() / update([ids]) for targeted rebuilds
  • GetBuilder<T> widget with auto-registration and lifecycle management
  • GetView<T> convenience base widget

Reactive state #

  • Rx<T>, RxInt, RxDouble, RxBool, RxString reactive value types
  • RxList<E>, RxMap<K,V>, RxSet<E> reactive collection types
  • .obs extension on any type
  • Obx and ObxValue widgets for automatic reactive rebuilds

Dependency injection #

  • Get.put — eager singleton registration
  • Get.lazyPut — deferred singleton (created on first find)
  • Get.create — factory registration (new instance per find)
  • Get.find / Get.findOrNull
  • Get.delete / Get.deleteAll
  • Get.replace — swap a registered instance
  • Get.reload / Get.reloadAll
  • Get.isRegistered / Get.isPrepared
  • tag support for multiple instances of the same type
  • GetxService — permanent service mixin (survives deleteAll)

Workers #

  • ever — fires on every value change
  • once — fires once when the condition is met
  • interval — rate-limits to at most once per duration
  • debounce — fires after a period of silence
  • Workers utility class for bulk disposal

Lifecycle #

  • GetLifeCycleMixin with onInit, onReady, onClose, onDelete
  • onReady is called one frame after onInit via SchedulerBinding.addPostFrameCallback
1
likes
135
points
110
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

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), and workers (ever, once, debounce, interval).

Repository (GitHub)
View/report issues

Topics

#state-management #dependency-injection #reactive #getx

License

MIT (license)

Dependencies

flutter

More

Packages that depend on get_light