ubuntu / archive_yaru.dart

Ubuntu Yaru Flutter Theme

Home Page:https://ubuntu.github.io/yaru.dart/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pub Package

yaru.dart implements the Ubuntu Yaru design and Canonical Vanilla Design as a Flutter theme for material.dart.

Test the theme in your browser - HERE

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. Import yaru.dart

    import 'package:yaru/yaru.dart';
  3. Create YaruTheme

    YaruTheme(
      builder: (context, yaru, child) {
        return MaterialApp(
          theme: yaru.theme,
          darkTheme: yaru.darkTheme,
          home: Scaffold(
            appBar: AppBar(
              title: Text('Yaru Theme'),
            ),
            body: Container(),
          ),
        );
      }
    );

Variants

Yaru comes in several variants. The YaruTheme widget detects the appropriate flavor and accent color from the system on Linux, and defaults to YaruVariant.orange on other platforms. Applications may choose a specific variant by manually setting the variant propert.

YaruTheme(
  data: YaruThemeData(
    variant: YaruVariant.red,
  ),
  child: ...
)

Contributing to yaru.dart

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

About

Ubuntu Yaru Flutter Theme

https://ubuntu.github.io/yaru.dart/

License:Mozilla Public License 2.0


Languages

Language:Dart 87.1%Language:CMake 5.2%Language:HTML 3.0%Language:C++ 2.8%Language:Ruby 0.9%Language:Swift 0.5%Language:C 0.5%Language:Kotlin 0.1%