Skip to content
This repository has been archived by the owner on Feb 25, 2024. It is now read-only.

Add successColor and warningColor extensions for ThemeData #167

Merged
merged 1 commit into from
May 4, 2022

Conversation

jpnurmi
Copy link
Member

@jpnurmi jpnurmi commented May 3, 2022

This is just syntactic sugar to have YaruColors.success and .warning
counterparts for Theme.of(context).errorColor.

Column(
  children: [
    Text('Error', style: TextStyle(color: Theme.of(context).errorColor)),
    Text('Warning', style: TextStyle(color: Theme.of(context).warningColor)),
    Text('Success', style: TextStyle(color: Theme.of(context).successColor)),
  ],
),

This is just syntactic sugar to have YaruColors.error and .warning
counterparts for Theme.of(context).errorColor.

```dart
Column(
  children: [
    Text('Error', style: TextStyle(color: Theme.of(context).errorColor)),
    Text('Warning', style: TextStyle(color: Theme.of(context).warningColor)),
    Text('Success', style: TextStyle(color: Theme.of(context).successColor)),
  ],
),
```
@Feichtmeier Feichtmeier merged commit 5bd1522 into ubuntu:main May 4, 2022
@Feichtmeier Feichtmeier mentioned this pull request May 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants