FLUTTER ECOSYSTEM

yako-dev/flutter-yako-theme-switch

您应用程序主题的酷炫开关

flutter-yako-theme-switch 项目封面
Stars
1
Forks
0
最近推送(UTC)
2026年4月9日
项目状态
未归档
Yako GitHub avatar
GITHUB Organization

Yako ↗

Great mobile apps with Flutter

语言C++CMakeDartHTMLSwiftCKotlinObjective-C

技术话题

此仓库发布的插件

使用的依赖

依赖清单 5 项

原始 README

以下为英文项目原文快照,最新内容请访问 GitHub。

展开 / 收起项目 README

Yako Theme Switch

Just a cool switch for your app's theme

https://github.com/yako-dev/flutter-yako-theme-switch/blob/main/assets/showcase_animation.gif?raw=true

Installing:

In your pubspec.yaml

dependencies:
  yako_theme_switch: ^2.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,
    ),

Check out other Yako packages:

Badges

Settings UI

Status Alert

Full Screen Menu

Diagonal decoration

and more to come!