yako_theme_switch 2.0.0 copy "yako_theme_switch: ^2.0.0" to clipboard
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.key to constructor — widgets can now be identified by key.
  • State class fields are now private (_animationController, _turnState, etc.).
  • createState uses State<YakoThemeSwitch> return type annotation.
  • const Color(...) used for default color literals.
  • Removed redundant addPostFrameCallback animation trigger in initState — eliminates a visual flash on initial render.
  • onChanged callback is now called outside setState, following Flutter best practices.
  • Replaced bare Container with SizedBox for the toggle hit area (semantic clarity).

Dependency Updates #

  • flutter_svg bumped from ^2.0.7 to ^2.2.3
  • mocktail bumped from ^0.3.0 to ^1.0.4
  • flutter_lints bumped from ^2.0.0 to ^6.0.0
  • Minimum Flutter SDK raised from >=3.10.0 to >=3.27.0
  • Minimum Dart SDK raised from >=3.0.0 to >=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
31
likes
160
points
97
downloads
screenshot

Documentation

API reference

Publisher

verified publisheryako.io

Weekly Downloads

Custom switch that looks good for changing the theme of the app

Repository (GitHub)
View/report issues

Topics

#ui

License

MIT (license)

Dependencies

flutter, flutter_svg

More

Packages that depend on yako_theme_switch