flutter_compositions 0.1.1 copy "flutter_compositions: ^0.1.1" to clipboard
flutter_compositions: ^0.1.1 copied to clipboard

Reactive composition primitives for Flutter inspired by the Vue 3 Composition API.

Changelog #

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

0.1.1 - 2025-11-06 #

  • FIX: ensure InheritedWidget composables update correctly.
  • FIX: add example package to workspace configuration.
  • FEAT: add examples for InheritedWidget composables and their usage.
  • FEAT: useContext and add tests for context behavior.
  • FEAT: init project.
  • DOCS: update feature list formatting in README.md.
  • DOCS: enhance README with detailed documentation sections and examples.

0.1.0 - 2025-10-27 #

Added #

  • Initial release of Flutter Compositions
  • Core reactivity system powered by alien_signals
  • CompositionWidget base class for creating reactive widgets
  • Reactive primitives: ref, computed, writableComputed, untracked
  • Side effect APIs: watch, watchEffect
  • Lifecycle hooks: onMounted, onUnmounted, onBuild
  • Dependency injection: provide, inject, InjectionKey
  • Reactive props access via widget()
  • Hot reload support: setup() re-executes during hot reload to pick up code changes
  • Automatic hot reload state preservation: ref() values are automatically preserved during hot reload based on their position in setup() - no manual configuration needed, similar to flutter_hooks
  • Built-in composables:
    • Controllers: useScrollController, useTextEditingController, usePageController, useFocusNode
    • Animations: useAnimationController, useSingleTickerProvider, manageAnimation
    • Async: useFuture, useAsyncData, useStream, useStreamController, useAsyncValue
    • Framework: useContext, useAppLifecycleState, useSearchController
    • Listenable: manageListenable, manageValueListenable, manageChangeNotifier
  • AsyncValue sealed class for type-safe async state handling with pattern matching
  • Custom ref: customRef, ReadonlyCustomRef
  • ComputedBuilder widget for using computed values in StatelessWidget
  • CompositionBuilder for functional composition API
  • Comprehensive documentation and examples
  • Complete test coverage for all core features

Documentation #

  • Complete API documentation
  • Beginner guide: Reactivity Fundamentals
  • Migration guide: From StatefulWidget
  • Technical deep dive for experienced engineers
  • Comparison with Provider, Riverpod, BLoC, and flutter_hooks
  • VitePress documentation site with i18n support

Development #

  • Monorepo structure with Melos
  • Custom lint rules package
  • Comprehensive test coverage
  • GitHub Actions CI/CD
6
likes
160
points
33
downloads

Publisher

verified publisheryokikiyo.com

Weekly Downloads

Reactive composition primitives for Flutter inspired by the Vue 3 Composition API.

Repository (GitHub)
View/report issues
Contributing

Documentation

Documentation
API reference

License

MIT (license)

Dependencies

alien_signals, flutter

More

Packages that depend on flutter_compositions