搜索插件、代码仓与 APP 分类

yaru 封面
插件详情v12.0.0

yaru

构建桌面和Web应用程序时常用的Flutter小部件。

Linux
近 30 天下载
2万
喜欢数
293
Pub 分数
150

安装插件

flutter pub add yaru

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

Yaru 是一个 Flutter 包,提供了一组适用于构建具有统一现代设计的桌面和 Web 应用程序的常用小部件。由 Ubuntu 设计,它与 Yaru 设计系统保持一致,提供视觉上连贯的组件,专为 Linux 平台优化,同时在 Web 和其他桌面环境中也能正常运行。该包强调易用性、可访问性和符合平台风格的样式,以简化用户界面开发。

适合场景

  • 构建跨平台桌面应用程序
  • 创建具有统一外观的网页界面
  • 开发原生 Linux 风格的 Flutter 应用
  • 增强设计系统中的UI一致性
  • 使用预设样式的组件快速原型设计

主要特点

  • 针对 Linux 平台优化的小部件
  • 跨平台的一致性设计语言
  • 面向可访问性的组件
  • 与 Ubuntu 视觉识别的集成
  • 适用于常见模式的即用型 UI 元素

适合对象

  • 面向 Linux 的桌面应用程序开发者
  • 寻求统一样式的Web应用程序设计师
  • 使用 Ubuntu 设计系统的团队
  • Flutter 项目需要精美的 UI 组件
  • 旨在快速实现用户界面的开发人员

使用建议

  • 主要针对 Linux 环境进行优化
  • 超出默认主题的自定义选项有限
  • 最适合与 Ubuntu 的美学风格一致的应用程序
  • 可能需要为非 Linux 平台添加额外的样式
  • 不适用于移动应用开发

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

The official Flutter Yaru Theme and Widgets Suite

Pub Package

This repository and package contains:

  • flutter widgets useful for building desktop and web applications, following but also expanding the yaru theme for the gnome desktop in Ubuntu 22.04+.
  • a theme for widgets from material.dart and from this repository
  • a complete icon set for flutter apps following the yaru design language

LIVE DEMO IN YOUR BROWSER

screenshot screenshot screenshot

Contributing

  • for everything you need

    • flutter

      sudo apt -y install git curl cmake meson make clang libgtk-3-dev pkg-config && mkdir -p ~/development && cd ~/development && git clone https://github.com/flutter/flutter.git -b stable && echo 'export PATH="$PATH:$HOME/development/flutter/bin"' >> ~/.bashrc && source ~/.bashrc
      
    • VsCode

      sudo snap install code --classic
      
  • to work on the icons and then build the font, you need to install the icon_font_generator tool:

    dart pub global activate -sgit https://github.com/Jupi007/icon_font_generator.git --git-ref yaru
    
  • Source SVGs files are located inside ./icons. The final icon name is determined by subfolder_name + icon_name (Ex: icons/mimetype/text-plain.svg will be named mimetype_text_plain).

  • After modifying or adding icons, you must run the build script, which will generate the icon font:

    ./build-icons.sh
    

    or run

    yaru_icon_font_generator assets/icons assets/yaru_icons.otf --output-class-file=lib/src/yaru_icons.dart -r
    

Contributing new gtk<->Flutter theme mappings

  1. Add a new YaruVariant in variant.dart
  2. Add a new mapping into the resolveVariant method inside inherited_theme.dart

Copying or Reusing

The theme and widgets are licensed under Mozilla Public License Version 2.0.

The icons have mixed licencing. You are free to copy, redistribute and/or modify aspects of this work under the terms of each licence accordingly (unless otherwise specified).

The icon assets (any and all source .svg files or rendered .ttf font) are licensed under the terms of the Creative Commons Attribution-ShareAlike 4.0 License.

Included scripts are free software licensed under the terms of the GNU General Public License, version 3.

所属分类

依赖

依赖清单 11 项

源码仓库

使用此插件的项目