Skyost/DayNightSwitcher
一個用純 Dart 編寫的簡單日夜切換小部件。
- Stars
- 37
- Forks
- 16
- 最近推送(UTC)
- 2023年3月21日
- 專案狀態
- 已封存
語言DartKotlinSwiftObjective-C
技術主題
使用的依賴
依賴清單 1 項
- flutter
{"sdk":"flutter"}
原始 README
以下為英文專案原文快照,最新內容請造訪 GitHub。
展開 / 收合專案 README
DayNightSwitcher
Just a simple simple day / night switcher widget made in pure Dart. It allows you to quickly show a beautiful dark mode switcher widget to your users.
https://github.com/Skyost/DayNightSwitcher/raw/master/screenshots/preview.gifHow to use ?
Using this plugin is pretty straightforward. You have two widgets : DayNightSwitcher and DayNightSwitcherIcon.
Here's a sample code for DayNightSwitcher :
DayNightSwitcher(
isDarkModeEnabled: isDarkModeEnabled,
onStateChanged: (isDarkModeEnabled) {
setState(() {
this.isDarkModeEnabled = isDarkModeEnabled;
});
},
),
The other one is very similar :
DayNightSwitcherIcon(
isDarkModeEnabled: isDarkModeEnabled,
onStateChanged: (isDarkModeEnabled) {
setState(() {
this.isDarkModeEnabled = isDarkModeEnabled;
});
},
),
Contributions
You have a lot of options to contribute to this project ! You can :
- Fork it on Github.
- Submit a feature request or a bug report.
- Donate to the developer.
- Watch a little ad on Clipeee.