finite_state_widget 0.0.2
finite_state_widget: ^0.0.2 copied to clipboard
Declarative FSM-driven widgets with optional controllers (MVC/MVVM style) and an easy map-based UI per-state.
Changelog #
All notable changes to this project will be documented in this file.
The format loosely follows Keep a Changelog and the project adheres to Semantic Versioning.
0.0.2 - 2026-03-04 #
Changed #
- BREAKING: Renamed
FiniteState.stategetter tocurrentStatefor consistency withFiniteStateController.currentStateand to avoid ambiguity with Flutter'sState<T>class.
Added #
buildCurrentState()protected method onFiniteState— returns the widget for the current state (with fallback). Useful for testing.switcherDurationoverridable getter onFiniteState— customizeAnimatedSwitcherduration (default: 180 ms). UseDuration.zeroto disable animation.- README: documented
FiniteStateWidgetas a third primitive alongsideStatelessWidgetandStatefulWidget. - Widget tests covering: initial render, dispatch transitions, fallback for unmapped state, lifecycle hooks, invalid transitions, custom
switcherDuration.