Skip to content

Commit

Permalink
dark theme context menu fix
Browse files Browse the repository at this point in the history
  • Loading branch information
julian-CStack committed Mar 17, 2023
1 parent d47782a commit 864375e
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ class _MaterialAppWithThemeState extends ConsumerState<MaterialAppWithTheme>
theme: ThemeData(
extensions: [colorScheme],
highlightColor: colorScheme.highlight,
brightness: Brightness.light,
brightness: colorScheme.brightness,
fontFamily: GoogleFonts.inter().fontFamily,
unselectedWidgetColor: colorScheme.radioButtonBorderDisabled,
// textTheme: GoogleFonts.interTextTheme().copyWith(
Expand Down
2 changes: 2 additions & 0 deletions lib/utilities/theme/chan_colors.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import 'package:stackwallet/utilities/theme/color_theme.dart';
class ChanColors extends StackColorTheme {
@override
ThemeType get themeType => ThemeType.chan;
@override
Brightness get brightness => Brightness.light;

@override
Color get background => const Color(0xFFF7F7F7);
Expand Down
1 change: 1 addition & 0 deletions lib/utilities/theme/color_theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ extension ThemeTypeExt on ThemeType {

abstract class StackColorTheme {
ThemeType get themeType;
Brightness get brightness;

Color get background;
Color get backgroundAppBar;
Expand Down
2 changes: 2 additions & 0 deletions lib/utilities/theme/dark_colors.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import 'package:stackwallet/utilities/theme/color_theme.dart';
class DarkColors extends StackColorTheme {
@override
ThemeType get themeType => ThemeType.dark;
@override
Brightness get brightness => Brightness.dark;

@override
Color get background => const Color(0xFF2A2D34);
Expand Down
2 changes: 2 additions & 0 deletions lib/utilities/theme/forest_colors.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import 'package:stackwallet/utilities/theme/color_theme.dart';
class ForestColors extends StackColorTheme {
@override
ThemeType get themeType => ThemeType.forest;
@override
Brightness get brightness => Brightness.light;

@override
Color get background => const Color(0xFFF3FAF5);
Expand Down
2 changes: 2 additions & 0 deletions lib/utilities/theme/fruit_sorbet_colors.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import 'package:stackwallet/utilities/theme/color_theme.dart';
class FruitSorbetColors extends StackColorTheme {
@override
ThemeType get themeType => ThemeType.fruitSorbet;
@override
Brightness get brightness => Brightness.light;

@override
Color get background => Colors.transparent;
Expand Down
2 changes: 2 additions & 0 deletions lib/utilities/theme/light_colors.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import 'package:stackwallet/utilities/theme/color_theme.dart';
class LightColors extends StackColorTheme {
@override
ThemeType get themeType => ThemeType.light;
@override
Brightness get brightness => Brightness.light;

@override
Color get background => const Color(0xFFF7F7F7);
Expand Down
2 changes: 2 additions & 0 deletions lib/utilities/theme/ocean_breeze_colors.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import 'package:stackwallet/utilities/theme/color_theme.dart';
class OceanBreezeColors extends StackColorTheme {
@override
ThemeType get themeType => ThemeType.oceanBreeze;
@override
Brightness get brightness => Brightness.light;

@override
Color get background => Colors.transparent;
Expand Down
2 changes: 2 additions & 0 deletions lib/utilities/theme/oled_black_colors.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import 'package:stackwallet/utilities/theme/color_theme.dart';
class OledBlackColors extends StackColorTheme {
@override
ThemeType get themeType => ThemeType.oledBlack;
@override
Brightness get brightness => Brightness.dark;

@override
Color get background => const Color(0xFF000000);
Expand Down
6 changes: 6 additions & 0 deletions lib/utilities/theme/stack_colors.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import 'package:stackwallet/utilities/theme/color_theme.dart';

class StackColors extends ThemeExtension<StackColors> {
final ThemeType themeType;
final Brightness brightness;

final Color background;
final Color backgroundAppBar;
Expand Down Expand Up @@ -191,6 +192,7 @@ class StackColors extends ThemeExtension<StackColors> {

StackColors({
required this.themeType,
required this.brightness,
required this.background,
required this.backgroundAppBar,
required this.gradientBackground,
Expand Down Expand Up @@ -340,6 +342,7 @@ class StackColors extends ThemeExtension<StackColors> {
factory StackColors.fromStackColorTheme(StackColorTheme colorTheme) {
return StackColors(
themeType: colorTheme.themeType,
brightness: colorTheme.brightness,
background: colorTheme.background,
backgroundAppBar: colorTheme.backgroundAppBar,
gradientBackground: colorTheme.gradientBackground,
Expand Down Expand Up @@ -493,6 +496,7 @@ class StackColors extends ThemeExtension<StackColors> {
@override
ThemeExtension<StackColors> copyWith({
ThemeType? themeType,
Brightness? brightness,
Color? background,
Color? backgroundAppBar,
Gradient? gradientBackground,
Expand Down Expand Up @@ -640,6 +644,7 @@ class StackColors extends ThemeExtension<StackColors> {
}) {
return StackColors(
themeType: themeType ?? this.themeType,
brightness: brightness ?? this.brightness,
background: background ?? this.background,
backgroundAppBar: backgroundAppBar ?? this.backgroundAppBar,
gradientBackground: gradientBackground ?? this.gradientBackground,
Expand Down Expand Up @@ -845,6 +850,7 @@ class StackColors extends ThemeExtension<StackColors> {

return StackColors(
themeType: other.themeType,
brightness: other.brightness,
gradientBackground: other.gradientBackground,
homeViewButtonBarBoxShadow: other.homeViewButtonBarBoxShadow,
standardBoxShadow: other.standardBoxShadow,
Expand Down

0 comments on commit 864375e

Please sign in to comment.