No description
Find a file
github-actions[bot] d5c9965b99
chore: release v1.2.2 (#410)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-02-21 18:13:19 +01:00
.github ci: remove CLA check (#365) 2023-09-25 12:24:45 -04:00
doc/readme Update readme and screenshots (#266) 2023-01-27 13:14:50 +01:00
example fix(SnackBarTheme): improve SnackBarTheme (#409) 2024-02-21 16:02:27 +01:00
lib fix(SnackBarTheme): improve SnackBarTheme (#409) 2024-02-21 16:02:27 +01:00
test feat!: use different shade of the same color for primary, secondary, tertiary (#390) 2023-08-15 18:57:24 +02:00
.gitignore Reorganize yaru and add yaru flavor themes (#110) 2021-11-17 20:19:25 +01:00
.metadata Regenerate package metadata (#273) 2023-02-03 10:28:53 +01:00
analysis_options.yaml Add common lint rules (#189) 2022-06-29 21:26:25 +02:00
CHANGELOG.md chore: release v1.2.2 (#410) 2024-02-21 18:13:19 +01:00
CONTRIBUTING.md Add CONTRIBUTING.md 2020-09-23 09:36:24 +12:00
LICENSE Re-license under MPL-2.0 to reduce the barrier for use by Flutter developers. 2020-10-05 09:52:47 -04:00
pubspec.yaml chore: release v1.2.2 (#410) 2024-02-21 18:13:19 +01:00
README.md Update readme and screenshots (#266) 2023-01-27 13:14:50 +01:00

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.