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

Related tags

Templates 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 Todo app with full fledge functionality and Awesome Look and feel.

to_do A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if this is

Naveed kaimkhani 4 Aug 5, 2022
An Ubuntu desktop settings app made with Flutter

unofficial Ubuntu Desktop Settings App made with Flutter - WIP TODO use real yaru icons - thanks to @Jupi007 improve layout implement settings search

Frederik Feichtmeier 236 Dec 15, 2022
NextPhoto - A Flutter Instagram look-alike photo blog application

A Flutter Instagram look-alike photo blog application. Uses jsonplaceholder for mock data. Please refer to coding task for info about desired features.

Sebastian 3 Aug 22, 2022
Neumorphic style - Example app with Flutter that displays a neumorphic style container

Flutter Neumorphic Style Example App Example app with Flutter that displays a ne

Piyush Nagpal 2 Mar 24, 2022
The official open source app of the GSDCs of Benin. Feel free to contribute and make this app great for every members

GDSC-Events-Benin The official open source app of the GSDCs of Benin. Feel free to contribute and make this app great for every members ?? Contributor

Junior Medehou 2 Feb 4, 2022
Flutter quick code snippets - Feel free to contribute.

Flutter quick code snippets Points to be noted Here you can add your own quick flutter code snippets which can be referred while coding Please make a

Deepa Pandey 13 Sep 21, 2022
A simple wholesome affirmations mirror to make you feel better about yourself.

goodmirror A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if th

Dagmawi Babi 4 Sep 5, 2022
Flathub-desktop - Unofficial Desktop Client for Flathub

Flathub Desktop Unofficial Desktop Client for Flathub How to build and run: You

Jean3219 2 Sep 19, 2022
An Android Launcher (having Ubuntu-Gnome flavour) build with Flutter

Ubuntu Launcher Introduction Ubuntu launcher is an custom android launcher build with Flutter with a Ubuntu-Gnome look. Though flutter is a cross plat

5hifaT 252 Dec 22, 2022
Flutter page widget that is dismissed by swipe gestures, with Hero style animations, Inspired by Facebook and Instagram stories.

dismissible_page ?? ?? Creates page that is dismissed by swipe gestures, with Hero style animations, Inspired by FB, IG stories. Live Demo Contents Su

Tornike 76 Dec 22, 2022
A highly customisable and simple widget for having iOS 13 style tab bars.

cupertino_tabbar A highly customisable and simple widget for having iOS 13 style tab bars. It is highly recommended to read the documentation and run

AliYigitBireroglu 98 Oct 31, 2022
Iosish indicator - 🍎 Create awesome and simple iOS style floating indicator which can be found when silent/sleep mode switched on Flutter.

Iosish indicator - ?? Create awesome and simple iOS style floating indicator which can be found when silent/sleep mode switched on Flutter.

Kim Seung Hwan 2 Apr 1, 2022
Custom style-dictionary transforms and formats to generate Flutter resources from a Figma Design Token plugin export..

style-dictionary-figma-flutter An extension to style-dictionary to support more custom types with Flutter as target platform. It supports the custom t

Aloïs Deniel 24 Dec 30, 2022
A BDD-style assertion library for Dart.

A BDD-style assertion library for Dart developers. It has built-in support for most common primitives, including Strings, Numbers Functions, Iterables

Aditya Kishore 9 Jan 22, 2022
Flutter cupertino style date picker.

Flutter Cupertino Date Picker [pub packages] | 中文说明 Flutter cupertino date picker. Usage 1. Depend Add this to you package's pubspec.yaml file: depend

Dylan Wu 333 Dec 26, 2022
Flutter cupertino style date picker.

Flutter Cupertino Date Picker [pub packages] | 中文说明 Flutter cupertino date picker. Usage 1. Depend Add this to you package's pubspec.yaml file: depend

Dylan Wu 333 Dec 26, 2022
🎮 Style your flutter game with a beautiful splash screen.

Flame Splash Screen Style your flame game with a beautiful splash screen. This package includes a FlameSplashScreen widget. Install Add flame_splash_s

Flame Engine 38 Sep 13, 2022
(RPG maker) Create RPG-style or similar games more simply with Flame.

Bonfire Build RPG games and similar with the power of FlameEngine! Bonfire is ideal for building games from the following perspectives: Test our onlin

Rafael Almeida Barbosa 787 Jan 7, 2023
The easiest way to style custom text snippets in flutter

Super Rich Text Check it out at Pub.Dev The easiest way to style custom text snippets Help Maintenance I've been maintaining quite many repos these da

Woton Sampaio 14 Nov 4, 2022