搜尋套件、儲存庫與 APP 分類

day_night_themed_switcher 封面
套件詳情v2.0.2

day_night_themed_switcher

使用純 Dart 編寫的優雅日夜切換小部件,為您的應用增添魅力——因為切換明暗模式應如魔法般輕盈一瞬!

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
185
喜歡數
9
Pub 分數
160

安裝套件

flutter pub add day_night_themed_switcher

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

一款簡潔、純粹的 Dart 小組件,可輕鬆在 Flutter 應用中切換日間與夜間主題。它透過極簡設定實現流暢的亮色/暗色模式切換,提升使用者體驗。專為尋求乾淨、可自訂解決方案以支援跨主要平台動態主題的開發者設計。該切換器可無縫整合至現有 UI 中,並透過直覺的視覺反饋促進可存取性。

適用情境

  • 在移動應用中實現深色模式
  • 啟用使用者偏好亮色/暗色主題
  • 建立具有主題感知功能的可存取使用者介面
  • 支援 Web 和桌面端的跨平台主題
  • 新增一個用於應用程式全域主題變更的切換按鈕

主要特色

  • 純 Dart 實現
  • 跨平台相容性
  • 最小化樣板設定
  • 可自定外觀
  • 平滑的主題過渡效果
  • 與 ThemeData 的輕鬆整合

適合對象

  • Flutter 開發人員建構具有主題偏好設定的應用程式
  • 適用於包括網頁和桌面在內的多個平台的應用程式
  • 想要精緻主題切換的設計者
  • 強調使用者體驗和可存取性的專案

使用建議

  • 需要手動處理主題持久化
  • 可能需要額外的邏輯來檢測系統主題
  • 僅限基本的晝夜主題切換
  • 不會自動與設備系統設定同步
  • 自定樣式可能需要額外的程式碼

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

Day and Night Themed Switcher

Demo

🎩✨ Behold, the marvel of simplicity meets elegance: the day_night_themed_switcher crafted purely in Dart! 🌗 With this widget, you can seamlessly toggle between the luminous radiance of daytime and the captivating allure of nighttime, right at your fingertips.

This nifty little creation not only adds functionality but also sprinkles a touch of charm to your app interface. Let your users revel in the joy of effortlessly transitioning between light and dark modes with just a tap.

So, why settle for mundane when you can dazzle your users with the magic of day and night? Add this widget to your arsenal and watch as your app shines bright like a diamond, day or night! ✨🌞🌙

Show some ❤️ and ⭐️ the Repo

Resources:

How to Use?

Utilizing this Plugin is as smooth as a gentle breeze. Tailor your experience effortlessly with customizable parameters such as duration, initiallyDark, and size, allowing you to craft the perfect appearance and behavior to suit your needs. 🛠️💫

DayNightSwitch(
  // duration: Duration(milliseconds: 800),
  // initiallyDark: true,
  size: 20,onChange: (dark) => setState(() {
    if (dark) {
      theme = ThemeMode.dark;
    } else {
      theme = ThemeMode.light;
    }
  }),
);

Contributions

所屬分類

依賴

依賴清單 2 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。