Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ubuntu/archive_yaru.dart
Ubuntu Yaru Flutter Theme
https://github.com/ubuntu/archive_yaru.dart
dart flutter ubuntu yaru
Last synced: about 2 months ago
JSON representation
Ubuntu Yaru Flutter Theme
- Host: GitHub
- URL: https://github.com/ubuntu/archive_yaru.dart
- Owner: ubuntu
- License: mpl-2.0
- Archived: true
- Created: 2020-09-08T23:13:34.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-02-21T17:14:51.000Z (7 months ago)
- Last Synced: 2024-06-16T06:39:23.702Z (3 months ago)
- Topics: dart, flutter, ubuntu, yaru
- Language: Dart
- Homepage: https://ubuntu.github.io/yaru.dart/
- Size: 43.3 MB
- Stars: 336
- Watchers: 12
- Forks: 42
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
[![Pub Package](https://img.shields.io/pub/v/yaru.svg)](https://pub.dev/packages/yaru)
[yaru.dart](https://github.com/ubuntu/yaru.dart) implements the Ubuntu [Yaru](https://github.com/ubuntu/yaru) design and [Canonical Vanilla Design](https://vanillaframework.io/) as a [Flutter](https://flutter.dev/) theme for [material.dart](https://api.flutter.dev/flutter/material/material-library.html).
[Test the theme in your browser - HERE](https://ubuntu.github.io/yaru.dart)
![Example app using Yaru light style](https://raw.githubusercontent.com/ubuntu/yaru.dart/main/doc/readme/screenshot_light.png)
![Example app using Yaru dark style](https://raw.githubusercontent.com/ubuntu/yaru.dart/main/doc/readme/screenshot_dark.png)## Using Yaru
To be able to use this package follow this steps:
1. [Installation](https://pub.dev/packages/yaru/install)
2. Import yaru.dart
```dart
import 'package:yaru/yaru.dart';
```
3. Create `YaruTheme`
```dart
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.```dart
YaruTheme(
data: YaruThemeData(
variant: YaruVariant.red,
),
child: ...
)
```## Contributing to yaru.dart
We welcome contributions! See the [contribution guide](CONTRIBUTING.md) for more details.