yako_theme_switch 2.0.0
yako_theme_switch: ^2.0.0 copied to clipboard
Custom switch that looks good for changing the theme of the app
2.0.0 [Apr 9, 2026] #
Improvements #
- Added
super.keyto constructor — widgets can now be identified by key. - State class fields are now private (
_animationController,_turnState, etc.). createStateusesState<YakoThemeSwitch>return type annotation.const Color(...)used for default color literals.- Removed redundant
addPostFrameCallbackanimation trigger ininitState— eliminates a visual flash on initial render. onChangedcallback is now called outsidesetState, following Flutter best practices.- Replaced bare
ContainerwithSizedBoxfor the toggle hit area (semantic clarity).
Dependency Updates #
flutter_svgbumped from^2.0.7to^2.2.3mocktailbumped from^0.3.0to^1.0.4flutter_lintsbumped from^2.0.0to^6.0.0- Minimum Flutter SDK raised from
>=3.10.0to>=3.27.0 - Minimum Dart SDK raised from
>=3.0.0to>=3.4.0
Tests #
- Replaced empty/commented test suite with 11 widget tests covering: rendering, default state, enabled state, tap callbacks, external prop updates, custom width, custom colors, custom duration, border radius, key support, and multi-tap alternation.
1.0.0+1 [Jul 9, 2023] #
- First release
