flutter_compositions 0.1.1
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 CompositionWidgetbase 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 insetup()- 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
- Controllers:
- AsyncValue sealed class for type-safe async state handling with pattern matching
- Custom ref:
customRef,ReadonlyCustomRef ComputedBuilderwidget for using computed values in StatelessWidgetCompositionBuilderfor 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