oledBlack theme added to desktop

This commit is contained in:
ryleedavis 2023-01-06 09:12:01 -07:00
parent 7aad7cb9e3
commit 23e3452cf1
5 changed files with 102 additions and 93 deletions

View file

@ -59,6 +59,7 @@ import 'package:stackwallet/utilities/theme/color_theme.dart';
import 'package:stackwallet/utilities/theme/dark_colors.dart'; import 'package:stackwallet/utilities/theme/dark_colors.dart';
import 'package:stackwallet/utilities/theme/light_colors.dart'; import 'package:stackwallet/utilities/theme/light_colors.dart';
import 'package:stackwallet/utilities/theme/ocean_breeze_colors.dart'; import 'package:stackwallet/utilities/theme/ocean_breeze_colors.dart';
import 'package:stackwallet/utilities/theme/oled_black_colors.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart'; import 'package:stackwallet/utilities/theme/stack_colors.dart';
import 'package:stackwallet/utilities/util.dart'; import 'package:stackwallet/utilities/util.dart';
import 'package:window_size/window_size.dart'; import 'package:window_size/window_size.dart';
@ -75,7 +76,6 @@ void main() async {
if (Platform.isIOS) { if (Platform.isIOS) {
Util.libraryPath = await getLibraryDirectory(); Util.libraryPath = await getLibraryDirectory();
} }
Screen? screen; Screen? screen;
if (Platform.isLinux || (Util.isDesktop && !Platform.isIOS)) { if (Platform.isLinux || (Util.isDesktop && !Platform.isIOS)) {
screen = await getCurrentScreen(); screen = await getCurrentScreen();
@ -323,6 +323,9 @@ class _MaterialAppWithThemeState extends ConsumerState<MaterialAppWithTheme>
case "dark": case "dark":
colorTheme = DarkColors(); colorTheme = DarkColors();
break; break;
case "oledBlack":
colorTheme = OledBlackColors();
break;
case "oceanBreeze": case "oceanBreeze":
colorTheme = OceanBreezeColors(); colorTheme = OceanBreezeColors();
break; break;

View file

@ -35,7 +35,9 @@ class _AppearanceOptionSettings
), ),
child: RoundedWhiteContainer( child: RoundedWhiteContainer(
radiusMultiplier: 2, radiusMultiplier: 2,
child: Column( child: Wrap(
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Padding( Padding(
@ -96,8 +98,8 @@ class _AppearanceOptionSettings
width: 40, width: 40,
child: DraggableSwitchButton( child: DraggableSwitchButton(
isOn: ref.watch( isOn: ref.watch(
prefsChangeNotifierProvider prefsChangeNotifierProvider.select(
.select((value) => value.showFavoriteWallets), (value) => value.showFavoriteWallets),
), ),
onValueChanged: (newValue) { onValueChanged: (newValue) {
ref ref
@ -132,12 +134,14 @@ class _AppearanceOptionSettings
], ],
), ),
), ),
const Padding( Padding(
padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),
child: ThemeToggle(), child: ThemeToggle(),
), ),
], ],
), ),
],
),
), ),
), ),
], ],

View file

@ -33,6 +33,7 @@ class _SVG {
switch (Theme.of(context).extension<StackColors>()!.themeType) { switch (Theme.of(context).extension<StackColors>()!.themeType) {
case ThemeType.light: case ThemeType.light:
case ThemeType.dark: case ThemeType.dark:
case ThemeType.oledBlack:
return null; return null;
case ThemeType.oceanBreeze: case ThemeType.oceanBreeze:

View file

@ -3,7 +3,7 @@ import 'package:stackwallet/utilities/theme/color_theme.dart';
class OledBlackColors extends StackColorTheme { class OledBlackColors extends StackColorTheme {
@override @override
ThemeType get themeType => ThemeType.dark; ThemeType get themeType => ThemeType.oledBlack;
@override @override
Color get background => const Color(0xFF000000); Color get background => const Color(0xFF000000);

View file

@ -20,6 +20,7 @@ class Background extends StatelessWidget {
switch (Theme.of(context).extension<StackColors>()!.themeType) { switch (Theme.of(context).extension<StackColors>()!.themeType) {
case ThemeType.light: case ThemeType.light:
case ThemeType.dark: case ThemeType.dark:
case ThemeType.oledBlack:
color = Theme.of(context).extension<StackColors>()!.background; color = Theme.of(context).extension<StackColors>()!.background;
break; break;
case ThemeType.oceanBreeze: case ThemeType.oceanBreeze: