搜索插件、代码仓与 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

源码仓库

使用此插件的项目

暂无相关数据。