Ubuntu Yaru Style - Distinct look and feel of the Ubuntu Desktop

Related tags

Desktop yaru.dart
Overview

Pub Package

Ubuntu Yaru Style - Distinct look and feel of the Ubuntu Desktop

Example app using Yaru light style Example app using Yaru dark style

Using Yaru

To be able to use this package follow this steps:

  1. Installation

  2. Make you sure when you import this package as yaru

    import 'package:yaru/yaru.dart' as yaru;
  3. Inside your MaterialApp set theme to yaru.lightTheme which is the standard light theme and darkTheme to yaru.darkTheme to get the yaru dark theme. The darkTheme property is used when you toggle your system theme to dark:

    MaterialApp(
          theme: yaru.lightTheme,
          darkTheme: yaru.darkTheme,
          home: Scaffold(
            appBar: AppBar(
              title: Text('Yaru Theme'),
            ),
            body: Container(),
          ),
        );

Contributing to yaru.dart

We welcome contributions! See the contribution guide for more details.

Flutter Version

Ubuntu Yaru Style requires Flutter 2. If you get an error about the current Dart SDK version similar to

=2.12.0 <3.0.0, version solving failed. pub get failed (1; Because yaru requires SDK version >=2.12.0 <3.0.0, version solving failed.) exit code 1 ">
[yaru.dart] flutter pub get
Running "flutter pub get" in yaru.dart...                       
The current Dart SDK version is 2.12.0-281.0.dev.

Because yaru requires SDK version >=2.12.0 <3.0.0, version solving failed.
pub get failed (1; Because yaru requires SDK version >=2.12.0 <3.0.0, version solving failed.)
exit code 1

please try upgrading to Flutter 2 by running

flutter upgrade
Comments
  • Material colors

    Material colors

    This PR replaces the home-made material palette generator with a simple node.js based tool that utilizes the material-color-tool package that implements the CIEDE2000-based color matching algorithm used by Google's Material color tool.

    | Before | After | |---|---| | Screenshot from 2022-04-22 00-05-35 | Screenshot from 2022-04-22 00-04-48 | | Screenshot from 2022-04-22 00-05-49 | Screenshot from 2022-04-22 00-04-59 | | Screenshot from 2022-04-22 00-05-53 | Screenshot from 2022-04-22 00-05-05 |

    opened by jpnurmi 22
  • Cleaning up the project & Fixing issues

    Cleaning up the project & Fixing issues

    Hi guys, I did the following:

    • [x] Remove unnecessary line.
    • [x] Closes #24
    • [x] Closes #42
    • [x] Doc the colors api.
    • [x] Extract the headline style.
    • [x] Make FAB green.
    • [ ] Fixing conflict

    PR Not ready to merge

    opened by elbeicktalat 17
  • Implement Custom Yaru Components for Flutter (WIP)

    Implement Custom Yaru Components for Flutter (WIP)

    I am not sure if this is a goal of this repository, but I have decided to improve the visual consistency of the components with the OG Yaru theme. I still have a lot to do, but I have implemented a few basic components. Most of these are based on the existing Material Components with a new visual style applied to the builder. So far, I have added these components:

    YaruCheckbox: (Currently the most finished) image

    YaruSwitch: (Unfinished) image

    YaruRadio: (Unfinished) image

    YaruButton: (Unfinished) image

    TODO:

    • [x] Finish Checkbox

    • [ ] Finish Radio

    • [ ] Finish Button

    • [ ] Finish Switch

    • [ ] Finish loading spinners and bars

    • [ ] Misc. Components (I'll cross that bridge when I get there )

    opened by nmcain 14
  • Fix for screenshots not appearing on pub.dart

    Fix for screenshots not appearing on pub.dart

    Fixes the screenshots not appearing on pub.dart One other approach could be to add the images in an issue and then link to them after posting the message

    opened by fcole90 12
  • Fixes incorrect fontWeight for some TextStyles.

    Fixes incorrect fontWeight for some TextStyles.

    [FontWeight] was not mentioned for the textStyles that need a regular fontWeight. This PR adds FontWeight.normal to those TextStyles.

    Moreover, it also fixes the visual density of Buttons. The padding of OutlinedButton and ElevatedButton was not behaving as it should.

    opened by ArishSultan 11
  • Specify accent colors as MaterialColor constants

    Specify accent colors as MaterialColor constants

    Move the material color generation logic out to a separate helper tool to be able to specify the accent colors as MaterialColor constants and to get rid of the extra "fooMaterialColor" variables that were exposed by the library.

    opened by jpnurmi 10
  • reorganize project structure

    reorganize project structure

    • [x] I signed the CLA.
    • [x] Make colors into separate file.
    • [x] Convert fields into private.
    • [x] Create src directory.
    • [x] Renaming colors.
    • [x] Update Example.

    Hi guys, I organized the project structure, everything still work like before, but I believe it's more organized.

    I hope it's mergeable. Thanks!

    Closes #16

    opened by elbeicktalat 10
  • Yaru bundles 48mb of fallback fonts

    Yaru bundles 48mb of fallback fonts

    • Create the default Flutter template app:

      flutter create .
      $ flutter create .
      Creating project ....
        pubspec.yaml (created)
      [...]
        .gitignore (created)
        linux/flutter/CMakeLists.txt (created)
        linux/my_application.cc (created)
        linux/main.cc (created)
        linux/CMakeLists.txt (created)
        linux/my_application.h (created)
        linux/.gitignore (created)
      Running "flutter pub get" in flutter_yaru...                     1,090ms
      Wrote 80 files.
      
      All done!
      In order to run your application, type:
      
        $ cd .
        $ flutter run
      
      Your application code is in ./lib/main.dart.
      
    • Build the app bundle:

      flutter build linux --release
      $ flutter build linux --release
      
      💪 Building with sound null safety 💪
      
      Building Linux application...                                           
      
    • Inspect the size of Flutter assets: (1.7mb)

      du -h
      $ du -h build/linux/x64/release/bundle/data/flutter_assets
      284K	build/linux/x64/release/bundle/data/flutter_assets/packages/cupertino_icons/assets
      288K	build/linux/x64/release/bundle/data/flutter_assets/packages/cupertino_icons
      292K	build/linux/x64/release/bundle/data/flutter_assets/packages
      1,3M	build/linux/x64/release/bundle/data/flutter_assets/fonts
      1,7M	build/linux/x64/release/bundle/data/flutter_assets
      
    • Add yaru as a dependency in pubspec.yaml, rebuild the app bundle:

      flutter pub get && flutter build linux --release
      $ flutter pub get && flutter build linux --release
      Running "flutter pub get" in flutter_yaru...                       368ms
      
      💪 Building with sound null safety 💪
      
      Building Linux application...       
      
    • Inspect the size of the assets again: (50mb)

      du -h
      $ du -h build/linux/x64/release/bundle/data/flutter_assets
      284K	build/linux/x64/release/bundle/data/flutter_assets/packages/cupertino_icons/assets
      288K	build/linux/x64/release/bundle/data/flutter_assets/packages/cupertino_icons
      48M	build/linux/x64/release/bundle/data/flutter_assets/packages/yaru/src/utils/fonts
      48M	build/linux/x64/release/bundle/data/flutter_assets/packages/yaru/src/utils
      48M	build/linux/x64/release/bundle/data/flutter_assets/packages/yaru/src
      48M	build/linux/x64/release/bundle/data/flutter_assets/packages/yaru
      49M	build/linux/x64/release/bundle/data/flutter_assets/packages
      1,3M	build/linux/x64/release/bundle/data/flutter_assets/fonts
      50M	build/linux/x64/release/bundle/data/flutter_assets
      
    • List the fonts

      ls -lah
      $ ls -lah build/linux/x64/release/bundle/data/flutter_assets/packages/yaru/src/utils/fonts
      total 48M
      drwxr-xr-x 2 jpnurmi jpnurmi 4,0K Sep 27 16:27 .
      drwxr-xr-x 3 jpnurmi jpnurmi 4,0K Sep 27 16:27 ..
      -rw-r--r-- 1 jpnurmi jpnurmi 366K Sep 27 16:27 LiberationSerif-BoldItalic.ttf
      -rw-r--r-- 1 jpnurmi jpnurmi 360K Sep 27 16:27 LiberationSerif-Bold.ttf
      -rw-r--r-- 1 jpnurmi jpnurmi 365K Sep 27 16:27 LiberationSerif-Italic.ttf
      -rw-r--r-- 1 jpnurmi jpnurmi 382K Sep 27 16:27 LiberationSerif-Regular.ttf
      -rw-r--r-- 1 jpnurmi jpnurmi  20M Sep 27 16:27 NotoSansCJK-Bold.ttc
      -rw-r--r-- 1 jpnurmi jpnurmi  20M Sep 27 16:27 NotoSansCJK-Regular.ttc
      -rw-r--r-- 1 jpnurmi jpnurmi 4,4M Sep 27 16:27 TibetanMachineUni.ttf
      -rw-r--r-- 1 jpnurmi jpnurmi 349K Sep 27 16:27 Ubuntu-BI.ttf
      -rw-r--r-- 1 jpnurmi jpnurmi 326K Sep 27 16:27 Ubuntu-B.ttf
      -rw-r--r-- 1 jpnurmi jpnurmi 401K Sep 27 16:27 Ubuntu-LI.ttf
      -rw-r--r-- 1 jpnurmi jpnurmi 406K Sep 27 16:27 Ubuntu-L.ttf
      -rw-r--r-- 1 jpnurmi jpnurmi 359K Sep 27 16:27 Ubuntu-MI.ttf
      -rw-r--r-- 1 jpnurmi jpnurmi 334K Sep 27 16:27 Ubuntu-M.ttf
      -rw-r--r-- 1 jpnurmi jpnurmi 378K Sep 27 16:27 Ubuntu-RI.ttf
      -rw-r--r-- 1 jpnurmi jpnurmi 346K Sep 27 16:27 Ubuntu-R.ttf
      
    • According to ubuntu-21.10-beta-desktop-amd64.manifest, the following packages are installed by default:

      • fonts-noto-cjk 1:20201206-cjk+repack1-1
      • fonts-noto-color-emoji 0~20200916-1
      • fonts-noto-mono 20201225-1build1
      • fonts-tibetan-machine 1.901b-5.1build1
    • Looking at text_theme.dart, these fonts are used as fallbacks. Are there other smaller alternatives?

    opened by jpnurmi 8
  • Use const where possible

    Use const where possible

    Closes https://github.com/ubuntu/yaru.dart/issues/34

    observing the changes in PR #29 I can see that

    • the comment claims to fix #16 but does not only partially (see #15 and #21)

    • ignores some of effective dart's guideline

      • if can be const if should be const, if cannot better calculate it than store it as final curiously this doesn't occur consistently
    • Colors holds both ColorSwatchs and Colors without comments or distinction

      • the former offers only a partial implementation compared with the previous code
    opened by iapicca 8
  • Fix example

    Fix example

    fixes https://github.com/ubuntu/yaru.dart/issues/38

    the current implementation of the example, while demonstrating successfully the package greatly disregards many best practices including dry, effective dart and performance best practices, together with plain wrong initialization and unnecessary rebuilds

    opened by iapicca 7
  • Fix AppBar border

    Fix AppBar border

    Draw it as a border rather than a 1px elevated shadow to get consistent results regardless of the platform and renderer.

    | Dark | Light | |---|---| | image | image |

    opened by jpnurmi 6
  • Update the `README.md` to explain why `YaruTheme` is instantiated as a wrapper for `MaterialApp`

    Update the `README.md` to explain why `YaruTheme` is instantiated as a wrapper for `MaterialApp`

    I attempted to use the getting started code from the README.md and it failed miserably. I had to dig into the example to find out how to use YaruThemeData and friends, but there is a distinct lack of explanation as to why it is built out the way it is.

    opened by domesticmouse 6
  • Density of list tiles and tables

    Density of list tiles and tables

    https://github.com/canonical/ubuntu-desktop-installer/issues/546#issuecomment-983400339

    • should we set the density globally ? I have some concerns with this
    • we should end up with less big list tiles, tables and inputs, can be set individually even though it might not be as satisfying from the a dev perspective as using a global setting

    The problem about setting it globally, even if the toolkit left a mechanism for this, is that the result might not be satisfying. First of all we could achieve the recreation of the mock-ups in the installer without it and changing it now might break widget sizes we didn't want to change. Then the buttons and all widgets really need to look everywhere the same, otherwise it is obviously totally inconsistent which would be a design nightmare.

    opened by Feichtmeier 6
Owner
Ubuntu
Ubuntu
A tutorial for creating an Ubuntu Linux Flutter app, using the yaru theme

Building a Yaru app with Flutter Summary URL https://github.com/ubuntu/user_manager Category Environment Linux Status Feedback Link Author Frederik Fe

Ubuntu 22 Dec 21, 2022
Ubuntu-flutter-plugins - A collection of Flutter plugins and packages for Ubuntu applications.

Flutter plugins for Ubuntu A collection of Flutter plugins and packages for Ubuntu applications. ubuntu_localizations - provides localizations for Flu

Canonical 25 Oct 12, 2022
Ubuntu Desktop Installer

Ubuntu Desktop Installer This project is a modern implementation of the Ubuntu Desktop installer, using subiquity as a backend and Flutter for the UI.

Canonical 388 Jan 7, 2023
Unofficial Ubuntu Desktop Settings App made with Flutter

Unofficial Ubuntu Desktop Settings App made with Flutter - WIP The goal of this project is to build a feature complete settings app for the Ubuntu des

Frederik Feichtmeier 239 Jan 1, 2023
Manage Subiquity for Ubuntu Desktop Installer

Manage Subiquity for Ubuntu Desktop Installer

J-P Nurmi 1 Mar 3, 2022
Trident - The magic kernel manager for elementary os and ubuntu based distros.

trident The magic kernel manager for elementary os and ubuntu based distros. testing Make a cache directory for trident in /var/cache/ sudo mkdir /var

Quinten Van Damme 4 Apr 5, 2022
Ubuntu Software Store

Unofficial Ubuntu Store Flutter - WIP An alternative software store for the Ubuntu Desktop made with Flutter. First goals Great UX Adaptive Layout Sna

Frederik Feichtmeier 288 Jan 3, 2023
A graphical application to enhance user experience with Ubuntu on WSL during the distro installation process.

Ubuntu WSL Splash A graphical application to enhance user experience with Ubuntu on WSL during the distro installation process. Made with: Getting Sta

Ubuntu 15 Dec 18, 2022
A Flutter package that makes it easy to customize and work with your Flutter desktop app window.

bitsdojo_window A Flutter package that makes it easy to customize and work with your Flutter desktop app window on Windows, macOS and Linux. Watch the

Bits Dojo 607 Jan 4, 2023
A Flutter package that makes it easy to customize and work with your Flutter desktop app's system tray.

system_tray A Flutter package that that enables support for system tray menu for desktop flutter apps. on Windows, macOS and Linux. Features: - Modify

AnTler 140 Dec 30, 2022
This plugin allows Flutter desktop apps to resizing and repositioning the window.

window_manager This plugin allows Flutter desktop apps to resizing and repositioning the window. window_manager Platform Support Quick Start Installat

LeanFlutter 351 Jan 7, 2023
A platform adaptive Flutter app for desktop, mobile and web.

Flutter Folio A demo app showcasing how Flutter can deliver a great multi-platform experience, targeting iOS, Android, MacOS, Windows, Linux, and web.

gskinner team 3.5k Jan 2, 2023
An open source desktop application for creating set-plans for TV and movie productions

lyghts_desktop An open source (Windows) desktop application for creating set-plans for TV and movie productions. Getting Started This application uses

MindStudio 1 Feb 15, 2022
Build beautiful desktop apps with flutter and rust. 🌠 (wip)

flutter-rs Build flutter desktop app in dart & rust. Get Started Install requirements Rust flutter sdk Develop install the cargo flutter command cargo

null 2k Dec 26, 2022
TinyPNG4Flutter - A TinyPNG Compress Image Desktop GUI For Flutter. Support macOS and windows

TinyPNG4Flutter A TinyPNG Compress Image Desktop GUI For Flutter. Support macOS

逸风 20 Dec 8, 2022
Build beautiful desktop apps with flutter and rust. 🌠

flutter-rs Build flutter desktop app in dart & rust. Get Started Install requirements Rust flutter sdk Develop install the cargo flutter command cargo

null 2k Dec 26, 2022
This plugin allows Flutter desktop apps to register and handle custom protocols

protocol_handler This plugin allows Flutter desktop apps to register and handle custom protocols (i.e. deep linking). English | 简体中文 protocol_handler

LeanFlutter 57 Dec 22, 2022
Flutter plugin for Flutter desktop(macOS/Linux/Windows) to change window size.

desktop_window Flutter plugin for Flutter desktop(macOS/Linux/Windows) to change window size. Usage import 'package:desktop_window/desktop_window.dart

ChunKoo Park 72 Dec 2, 2022
This plugin allows Flutter desktop apps to defines system/inapp wide hotkey (i.e. shortcut).

hotkey_manager This plugin allows Flutter desktop apps to defines system/inapp wide hotkey (i.e. shortcut). hotkey_manager Platform Support Quick Star

LeanFlutter 81 Dec 21, 2022