yako_theme_switch 3.0.1 copy "yako_theme_switch: ^3.0.1" to clipboard
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:

Animated demo of the settings_ui Flutter package: an iOS-style settings screen with Appearance and General sections; turning on Dark mode switches the whole list to dark.
settings_ui
Settings screens that look native on every platform.
Animated demo of the badges Flutter package: a count badge on a cart icon goes from 1 to 4, a notification badge pops in, and a Twitter-style verified badge, a NEW label and an Instagram-shaped badge appear.
badges
Badges for any widget: counters, dots, shapes and animations.
Animated demo of the yako_celebrations Flutter package: an epic celebration fills a dark screen with fireworks, flames, spinning coins, confetti and popping Yako logos under a LEVEL UP! title.
yako_celebrations
Full-screen celebrations in one line: confetti, coins, fireworks, flames.
Animated demo of the status_alert Flutter package: liking a song shows an Apple-style blurred Loved popup with an icon and a subtitle, which then fades away.
status_alert
Apple-style status alerts that hide themselves.
Animated demo of the full_screen_menu Flutter package: a blurred full-screen overlay opens over a weather app with five round gradient buttons and a close button.
full_screen_menu
A full-screen menu with round gradient buttons.
Screenshot of the diagonal_decoration Flutter package: one card filled with fine diagonal lines (DiagonalDecoration) and one with a curved line mesh (MatrixDecoration).
diagonal_decoration
Diagonal-line and mesh backgrounds for boxes.
31
likes
160
points
209
downloads
screenshot

Documentation

API reference

Publisher

verified publisheryako.dev

Weekly Downloads

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

Repository (GitHub)
View/report issues

Topics

#ui #widget #switch #theme #dark-mode

License

MIT (license)

Dependencies

flutter, flutter_svg, material_ui

More

Packages that depend on yako_theme_switch