Skip to content

Commit

Permalink
feat: Ubuntu Butterfly variant (#220)
Browse files Browse the repository at this point in the history
Now that yaru_colors.dart has the Ubuntu Butterfly Pink, we can have the variant in yaru.dart
  • Loading branch information
ymauray authored Nov 11, 2022
1 parent 2f3a617 commit 899943b
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
35 changes: 35 additions & 0 deletions lib/src/themes/ubuntu_butterfly.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import 'package:flutter/material.dart';
import 'package:yaru_colors/yaru_colors.dart';
import 'package:yaru/src/themes/common_themes.dart';

const _primaryColor = YaruColors.ubuntuButterflyPink;

final _lightColorScheme = ColorScheme.fromSwatch(
primarySwatch: _primaryColor,
primaryColorDark: YaruColors.coolGrey,
accentColor: _primaryColor,
cardColor: Colors.white,
backgroundColor: YaruColors.porcelain,
errorColor: YaruColors.error,
brightness: Brightness.light,
);

final yaruUbuntuButterflyLight = createYaruLightTheme(
colorScheme: _lightColorScheme,
primaryColor: _primaryColor,
);

final _darkColorScheme = ColorScheme.fromSwatch(
primarySwatch: _primaryColor,
primaryColorDark: YaruColors.coolGrey,
accentColor: _primaryColor,
cardColor: YaruColors.jet,
backgroundColor: YaruColors.jet,
errorColor: YaruColors.error,
brightness: Brightness.dark,
);

final yaruUbuntuButterflyDark = createYaruDarkTheme(
colorScheme: _darkColorScheme,
primaryColor: _primaryColor,
);
6 changes: 6 additions & 0 deletions lib/src/themes/variant.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import 'package:yaru_colors/yaru_colors.dart';
import 'package:yaru/src/themes/kubuntu.dart';
import 'package:yaru/src/themes/lubuntu.dart';
import 'package:yaru/src/themes/ubuntu_budgie.dart';
import 'package:yaru/src/themes/ubuntu_butterfly.dart';
import 'package:yaru/src/themes/ubuntu_mate.dart';
import 'package:yaru/src/themes/ubuntu_studio.dart';
import 'package:yaru/src/themes/xubuntu.dart';
Expand Down Expand Up @@ -30,6 +31,9 @@ enum YaruVariant {
/// Ubuntu Budgie
ubuntuBudgieBlue(YaruColors.ubuntuBudgieBlue),

/// Ubuntu Butterfly
ubuntuButterflyPink(YaruColors.ubuntuButterflyPink),

/// Ubuntu MATE
ubuntuMateGreen(YaruColors.ubuntuMateGreen),

Expand Down Expand Up @@ -65,6 +69,7 @@ final _yaruLightThemes = <YaruVariant, ThemeData>{
YaruVariant.kubuntuBlue: yaruKubuntuLight,
YaruVariant.lubuntuBlue: yaruLubuntuLight,
YaruVariant.ubuntuBudgieBlue: yaruUbuntuBudgieLight,
YaruVariant.ubuntuButterflyPink: yaruUbuntuButterflyLight,
YaruVariant.ubuntuMateGreen: yaruUbuntuMateLight,
YaruVariant.ubuntuStudioBlue: yaruUbuntuStudioLight,
YaruVariant.xubuntuBlue: yaruXubuntuLight,
Expand All @@ -84,6 +89,7 @@ final _yaruDarkThemes = <YaruVariant, ThemeData>{
YaruVariant.kubuntuBlue: yaruKubuntuDark,
YaruVariant.lubuntuBlue: yaruLubuntuDark,
YaruVariant.ubuntuBudgieBlue: yaruUbuntuBudgieDark,
YaruVariant.ubuntuButterflyPink: yaruUbuntuButterflyDark,
YaruVariant.ubuntuMateGreen: yaruUbuntuMateDark,
YaruVariant.ubuntuStudioBlue: yaruUbuntuStudioDark,
YaruVariant.xubuntuBlue: yaruXubuntuDark,
Expand Down

0 comments on commit 899943b

Please sign in to comment.