yako_theme_switch 3.0.1
yako_theme_switch: ^3.0.1 copied to clipboard
Custom switch that looks good for changing the theme of the app
Yako Theme Switch #
Just a cool switch for your app's theme
Installing: #
Requirements: Flutter 3.47+ (material_ui). On older Flutter, use yako_theme_switch: ^2.0.1.
In your pubspec.yaml
dependencies:
yako_theme_switch: ^3.0.0
Basic Usage: #
YakoThemeSwitch(
enabled: themeMode == ThemeMode.light,
onChanged: (bool value) {
setState(() => themeMode = value ? ThemeMode.light : ThemeMode.dark);
},
);
Advanced usage #
YakoThemeSwitch(
enabled: themeMode == ThemeMode.light,
onChanged: (bool value) {
setState(() => themeMode = value ? ThemeMode.light : ThemeMode.dark);
},
width: 50,
enabledBackgroundColor: Colors.blue,
disabledBackgroundColor: Colors.red,
enabledToggleColor: Colors.white,
disabledToggleColor: Colors.white,
animationDuration: const Duration(milliseconds: 300),
enabledToggleBorderRadius: 8,
),
More from Yako #
Other Flutter packages from the same team:
![]() settings_ui Settings screens that look native on every platform. |
![]() badges Badges for any widget: counters, dots, shapes and animations. |
![]() yako_celebrations Full-screen celebrations in one line: confetti, coins, fireworks, flames. |
![]() status_alert Apple-style status alerts that hide themselves. |
![]() full_screen_menu A full-screen menu with round gradient buttons. |
![]() diagonal_decoration Diagonal-line and mesh backgrounds for boxes. |






