Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ubuntu-flutter-community/phoenix_theme
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 95fc6e949b78834327595f20330eadd3aba2a761
Choose a base ref
..
head repository: ubuntu-flutter-community/phoenix_theme
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: d1de5436cf8a55aa5c1a1fbc13d2aa3bb9f48bb5
Choose a head ref
Showing with 13 additions and 3 deletions.
  1. +1 −0 CHANGELOG.md
  2. +12 −3 lib/src/theme.dart
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -6,6 +6,7 @@
### Bug Fixes

* darker dark theme ([#4](https://github.com/ubuntu-flutter-community/phoenix_theme/issues/4)) ([a34d30b](https://github.com/ubuntu-flutter-community/phoenix_theme/commit/a34d30b3376cfdb161e2cbf40631941766136239))
* different dark themes for mobile and desktop ([fe7b369](https://github.com/ubuntu-flutter-community/phoenix_theme/commit/fe7b369cdf03a15c735c866584a251da68f3a716))

## [1.0.1](https://github.com/ubuntu-flutter-community/phoenix_theme/compare/v1.0.0...v1.0.1) (2024-08-31)

15 changes: 12 additions & 3 deletions lib/src/theme.dart
Original file line number Diff line number Diff line change
@@ -12,8 +12,15 @@ bool get _isMobile =>
typedef ThemePair = ({ThemeData lightTheme, ThemeData darkTheme});

const _lightBase = Colors.white;
final _darkBase = Colors.black.scale(lightness: 0.04);
final _darkMenuBase = Colors.black.scale(lightness: 0.08);
final _darkBaseDesktop = Colors.black.scale(lightness: 0.09);
final _darkBaseMobile = Colors.black.scale(lightness: 0.04);

final _darkBase = _isMobile ? _darkBaseMobile : _darkBaseDesktop;

final _darkMenuBaseDesktop = Colors.black.scale(lightness: 0.07);
final _darkMenuBaseMobile = Colors.black.scale(lightness: 0.08);
final _darkMenuBase = _isMobile ? _darkMenuBaseMobile : _darkMenuBaseDesktop;

const _kContainerRadius = 10.0;
const _kDesktopButtonHeight = 42.0;
const _kMobileButtonHeight = 48.0;
@@ -186,7 +193,9 @@ CardTheme _cardTheme(ColorScheme colorScheme) {

Color _cardColor(ColorScheme colorScheme) {
return colorScheme.surface.scale(
lightness: colorScheme.isLight ? -0.06 : 0.08,
lightness: _isMobile
? (colorScheme.isLight ? -0.06 : 0.08)
: (colorScheme.isLight ? -0.06 : 0.05),
);
}