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

moon_design 封面
套件詳情v1.1.0

moon_design

適用於 Flutter 的 Moon 設計系統。一組遵循 Moon 設計系統的連貫、可主題化且可擴展的組件。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
1540
喜歡數
102
Pub 分數
140

安裝套件

flutter pub add moon_design

套件介紹

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

Moon Design System for Flutter 提供了一組協調一致的可主題化與可擴展元件,符合 Moon Design System 的標準。專為跨平台一致性設計,讓開發者能在 Android、iOS、Web、macOS、Windows 與 Linux 上建立視覺統一的應用程式。系統支援自訂主題,並透過簡單的 pub 命令輕鬆整合。具備完善的元件文件與對可存取性及可擴展性的重視,簡化 UI 開發流程,同時維持設計完整性。

適用情境

  • 使用一致的 UI 建立跨平台應用
  • 實施品牌一致的設計系統
  • 使用預設計組件進行快速原型設計
  • 建立可存取且響應式介面
  • 啟用團隊範圍的設計一致性

主要特色

  • 動態顏色方案的主題支援
  • 可擴展的組件架構
  • 跨平台相容性
  • 注重可存取性的組件
  • 模組化和可重用的設計元素

適合對象

  • UI/UX 設計師與開發人員協作
  • 採用標準化設計語言的團隊
  • 需要多平台部署的項目
  • 初創公司正在構建可擴展的產品介面
  • 尋求高效時間的UI解決方案的開發者

使用建議

  • 需要理解 Flutter 的元件系統
  • 自定義可能需要更深入的主題知識
  • 限於與月設計原則一致的使用場景
  • 可能會為非常簡單的應用程式引入開銷
  • 依賴 GitHub 倉庫取得更新與錯誤修復

原始 README

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

Moon Design System

Version Build Conventional Commits

Moon Design System

Note: This project uses Release Please and Conventional Commits spec, please follow the conventions or consider using Commitizen to write commit messages.

Disclaimer

The current major release, v1.0.0, will be maintained as-is and will not receive further updates, except for patches. The v1 theming is based on the soon-to-be deprecated Moon Design Figma v1 and lacks flexibility. For greater control over theming with v1 of moon_flutter, it is recommended to create custom wrapper widgets around the moon_flutter widgets that align with your project's specific theming requirements.

There is ongoing background work for v2 which aims to be more modular, scalable and themable.

Resources

Applying theming and overrides

  • Declare tokens variable and optionally override values:
final lightTokens = MoonTokens.light.copyWith(
  colors: MoonColors.light.copyWith(
    piccolo: Colors.blue,
    textPrimary: Colors.amber,
  ),
  typography: MoonTypography.typography.copyWith(
    heading: MoonTypography.typography.heading.apply(
      // Using variable font and bumping down the font weight compared to the
      // baseline 600 for heading.
      fontFamily: "DMSans",
      fontWeightDelta: -1,
      fontVariations: [const FontVariation('wght', 500)],
    ),
  ),
);

final lightTheme = ThemeData.light().copyWith(
    extensions: <ThemeExtension<dynamic>>[MoonTheme(tokens: lightTokens)],
  );
  • Or if needed override widget theming:
final lightTheme = ThemeData.light().copyWith(
  extensions: <ThemeExtension<dynamic>>[
    MoonTheme(tokens: lightTokens).copyWith(
      accordionTheme: MoonAccordionTheme(tokens: lightTokens).copyWith(
        colors: MoonAccordionTheme(tokens: lightTokens).colors.copyWith(
              backgroundColor: Colors.green,
            ),
      ),
    ),
  ],
);
  • Apply the declared theme:
return MaterialApp(
      title: 'Moon Design System example',
      theme: lightTheme,
      home: const HomePage(),
 );

所屬分類

依賴

依賴清單 2 項

  • moon_icons^1.1.0
  • moon_tokens^0.0.6

原始碼儲存庫

使用此套件的專案

暫無相關資料。