Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds an epic looking dark theme called "Obsidium" #144

Merged
merged 6 commits into from
Aug 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion lib/model/available_themes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
import 'package:natrium_wallet_flutter/themes.dart';
import 'package:natrium_wallet_flutter/model/setting_item.dart';

enum ThemeOptions { NATRIUM, TITANIUM, INDIUM, NEPTUNIUM, THORIUM }
enum ThemeOptions { NATRIUM, TITANIUM, INDIUM, NEPTUNIUM, THORIUM, OBSIDIUM }

/// Represent notification on/off setting
class ThemeSetting extends SettingSelectionItem {
Expand All @@ -12,6 +12,8 @@ class ThemeSetting extends SettingSelectionItem {

String getDisplayName(BuildContext context) {
switch (theme) {
case ThemeOptions.OBSIDIUM:
return "Obsidium";
case ThemeOptions.THORIUM:
return "Thorium";
case ThemeOptions.NEPTUNIUM:
Expand All @@ -28,6 +30,8 @@ class ThemeSetting extends SettingSelectionItem {

BaseTheme getTheme() {
switch (theme) {
case ThemeOptions.OBSIDIUM:
return ObsidiumTheme();
case ThemeOptions.THORIUM:
return ThoriumTheme();
case ThemeOptions.NEPTUNIUM:
Expand Down
79 changes: 76 additions & 3 deletions lib/themes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ abstract class BaseTheme {
Color overlay80;
Color overlay85;
Color overlay90;

Color animationOverlayMedium;
Color animationOverlayStrong;

Expand Down Expand Up @@ -437,7 +437,80 @@ class ThoriumTheme extends BaseTheme {
AppIconEnum appIcon = AppIconEnum.THORIUM;
}

class ObsidiumTheme extends BaseTheme {
static const lightBlue = Color(0xFF5C9BE5);

static const lightGrey = Color(0xFFC7C6CB);

static const greenDark = Color(0xFF18A264);

static const grey = Color(0xFF1C1C1E);

static const blueishGreyDarkest = Color(0xFF1E2C3D);

static const white = Color(0xFFFFFFFF);

static const black = Color(0xFF000000);

Color primary = lightBlue;
Color primary60 = lightBlue.withOpacity(0.6);
Color primary45 = lightBlue.withOpacity(0.45);
Color primary30 = lightBlue.withOpacity(0.3);
Color primary20 = lightBlue.withOpacity(0.2);
Color primary15 = lightBlue.withOpacity(0.15);
Color primary10 = lightBlue.withOpacity(0.1);

Color success = greenDark;
Color success60 = greenDark.withOpacity(0.6);
Color success30 = greenDark.withOpacity(0.3);
Color success15 = greenDark.withOpacity(0.15);

Color successDark = black;
Color successDark30 = black.withOpacity(0.3);

Color background = black;
Color background40 = black.withOpacity(0.4);
Color background00 = black.withOpacity(0.0);

Color backgroundDark = grey;
Color backgroundDark00 = grey.withOpacity(0.0);

Color backgroundDarkest = blueishGreyDarkest;

Color text = white.withOpacity(0.9);
Color text60 = white.withOpacity(0.6);
Color text45 = white.withOpacity(0.45);
Color text30 = white.withOpacity(0.3);
Color text20 = white.withOpacity(0.2);
Color text15 = white.withOpacity(0.15);
Color text10 = white.withOpacity(0.1);
Color text05 = white.withOpacity(0.05);
Color text03 = white.withOpacity(0.03);

Color overlay20 = black.withOpacity(0.2);
Color overlay30 = black.withOpacity(0.3);
Color overlay50 = black.withOpacity(0.5);
Color overlay70 = black.withOpacity(0.7);
Color overlay80 = black.withOpacity(0.8);
Color overlay85 = black.withOpacity(0.85);
Color overlay90 = black.withOpacity(0.9);

Color animationOverlayMedium = black.withOpacity(0.7);
Color animationOverlayStrong = black.withOpacity(0.85);

Brightness brightness = Brightness.dark;
SystemUiOverlayStyle statusBar =
SystemUiOverlayStyle.light.copyWith(statusBarColor: Colors.transparent);

BoxShadow boxShadow = BoxShadow(color: Colors.transparent);
BoxShadow boxShadowButton = BoxShadow(color: Colors.transparent);

OverlayTheme qrScanTheme = OverlayTheme.OBSIDIUM;
AppIconEnum appIcon = AppIconEnum.NATRIUM;
}

enum AppIconEnum { NATRIUM, TITANIUM, INDIUM, NEPTUNIUM, THORIUM }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I missed this actually, AppIconEnum is for on iOS devices the app icon changes with the theme, but since there is no icon for your theme you should just use the NATRIUM (default) icon.


Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove obsidium

class AppIcon {
static const _channel = const MethodChannel('fappchannel');

Expand Down Expand Up @@ -465,8 +538,8 @@ class AppIcon {
break;
}
final Map<String, dynamic> params = <String, dynamic>{
'icon': iconStr,
'icon': iconStr,
};
return await _channel.invokeMethod('changeIcon', params);
}
}
}