Skip to content

Commit

Permalink
Merge pull request #21 from arceusVen1/theme_update
Browse files Browse the repository at this point in the history
theme_update
  • Loading branch information
arceusVen1 authored Apr 2, 2024
2 parents 2da846c + bc25b1a commit 5529c28
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 49 deletions.
56 changes: 28 additions & 28 deletions lib/color_schemes.g.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,30 @@ import 'package:flutter/material.dart';

const lightColorScheme = ColorScheme(
brightness: Brightness.light,
primary: Color(0xff993300),
primaryContainer: Color(0xffb6a483),
onPrimary: Color(0xffb6a483),
onPrimaryContainer: Color(0xff333232),
secondary: Color(0xff993300),
secondaryContainer: Color(0xff993300),
primary: Color(0xffb6a483),
primaryContainer: Color(0xff00ff00),
onPrimary: Color(0xff00ff00),
onPrimaryContainer: Color(0xff00ff00),
secondary: Color(0xffb6a483),
secondaryContainer: Color(0xff00ff00),
onSecondary: Color(0xff00ff00),
onSecondaryContainer: Color(0xff333232),
tertiary: Color(0xff00ff00),
onSecondaryContainer: Color(0xff00ff00),
tertiary: Color(0xffb6a483),
tertiaryContainer: Color(0xff00ff00),
onTertiary: Color(0xff00ff00),
onTertiaryContainer: Color(0xff00ff00),
background: Color(0xffffffff),
onBackground: Color(0xff333232),
outline: Color(0xff333232),
outlineVariant: Color(0xff333232),
inversePrimary: Color(0xff00ff00),
inverseSurface: Color(0xffb6a483),
onInverseSurface: Color(0xff333232),
inverseSurface: Color(0xff00ff00),
onInverseSurface: Color(0xff00ff00),
onSurface: Color(0xff333232),
onSurfaceVariant: Color(0xff333232),
outline: Color(0xff333232),
outlineVariant: Color(0xff993300),
surface: Color(0xffb6a483),
surfaceTint: Color(0x00000000),
surface: Color(0xffffffff),
surfaceVariant: Color(0xffb6a483),
surfaceTint: Color(0x00000000),
error: Color(0xffba1a1a),
errorContainer: Color(0xffffdad6),
onError: Color(0xffffffff),
Expand All @@ -37,29 +37,29 @@ const lightColorScheme = ColorScheme(
const darkColorScheme = ColorScheme(
brightness: Brightness.dark,
primary: Color(0xff993300),
primaryContainer: Color(0xff993300),
onPrimary: Color(0xffb3ada1),
onPrimaryContainer: Color(0xffb3ada1),
primaryContainer: Color(0xff00ff00),
onPrimary: Color(0xff00ff00),
onPrimaryContainer: Color(0xff00ff00),
secondary: Color(0xff993300),
secondaryContainer: Color(0xff993300),
secondaryContainer: Color(0xff00ff00),
onSecondary: Color(0xff00ff00),
onSecondaryContainer: Color(0xff333232),
tertiary: Color(0xff00ff00),
onSecondaryContainer: Color(0xff00ff00),
tertiary: Color(0xff333232),
tertiaryContainer: Color(0xff00ff00),
onTertiary: Color(0xff00ff00),
onTertiaryContainer: Color(0xff00ff00),
background: Color(0xff000000),
onBackground: Color(0xffb3ada1),
onBackground: Color(0xffb6a483),
outline: Color(0xffb6a483),
outlineVariant: Color(0xffb6a483),
inversePrimary: Color(0xff00ff00),
inverseSurface: Color(0xff333232),
onInverseSurface: Color(0xffb3ada1),
onSurface: Color(0xffb3ada1),
onSurfaceVariant: Color(0xffb3ada1),
outline: Color(0xffb3ada1),
outlineVariant: Color(0xffb3ada1),
inverseSurface: Color(0xff00ff00),
onInverseSurface: Color(0xff00ff00),
onSurface: Color(0xffb6a483),
onSurfaceVariant: Color(0xffb6a483),
surface: Color(0xff333232),
surfaceVariant: Color(0xffb6a483),
surfaceTint: Color(0x00000000),
surfaceVariant: Color(0xff333232),
error: Color(0xffba1a1a),
errorContainer: Color(0xffffdad6),
onError: Color(0xffffffff),
Expand Down
5 changes: 3 additions & 2 deletions lib/theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,11 @@ class ThemeModeSwitcher extends ConsumerWidget {
children: [
Icon(
isDarkMode ? Icons.dark_mode : Icons.light_mode,
color: theme.colorScheme.onPrimaryContainer,
color: theme.colorScheme.onBackground,
),
Switch.adaptive(
activeColor: theme.colorScheme.primary,
inactiveTrackColor: theme.colorScheme.tertiary,
activeColor: theme.colorScheme.surfaceVariant,
value: isDarkMode,
onChanged: (isOn) {
isOn
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,14 @@ class FlagBox extends StatelessWidget {
width: double.infinity,
decoration: BoxDecoration(
color: isOn
? theme.colorScheme.primaryContainer
? theme.colorScheme.secondary
: theme.colorScheme.background,
border: Border.all(color: theme.colorScheme.outline),
border: Border.all(color: theme.colorScheme.onBackground),
borderRadius: BorderRadius.circular(4),
),
child: Label.small(
label,
color: isOn
? theme.colorScheme.onPrimaryContainer
: theme.colorScheme.onBackground,
color: theme.colorScheme.onBackground,
),
);
}
Expand Down
8 changes: 3 additions & 5 deletions lib/widgets/header2/widgets/chunks/attributes/levels.dart
Original file line number Diff line number Diff line change
Expand Up @@ -200,16 +200,14 @@ class _LevelWrapper extends StatelessWidget {
padding: const EdgeInsets.symmetric(vertical: 2, horizontal: 4),
decoration: BoxDecoration(
color: level.isOn
? theme.colorScheme.primaryContainer
? theme.colorScheme.secondary
: theme.colorScheme.background,
border: Border.all(color: theme.colorScheme.outline),
border: Border.all(color: theme.colorScheme.onBackground),
borderRadius: BorderRadius.circular(4.0),
),
child: Label.small(
level.label,
color: level.isOn
? theme.colorScheme.onPrimaryContainer
: theme.colorScheme.onBackground,
color: theme.colorScheme.onBackground,
),
);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/widgets/utils/buttons.dart
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class Button extends StatelessWidget {
final colorToUse = color ??
(isPrimary
? theme.colorScheme.secondary
: theme.colorScheme.primaryContainer);
: theme.colorScheme.secondary);
return isOutlined
? OutlinedButton(
onPressed: !disabled ? onPressed : null,
Expand Down
10 changes: 5 additions & 5 deletions lib/widgets/utils/data_display.dart
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class SectionWrapper extends StatelessWidget {
defaultPadding, max(defaultPadding - spacing, 0)),
width: double.infinity,
decoration: BoxDecoration(
border: Border.all(color: theme.colorScheme.outline, width: 1),
border: Border.all(color: theme.colorScheme.onBackground, width: 1),
borderRadius: BorderRadius.circular(4.0),
shape: BoxShape.rectangle,
color: theme.colorScheme.background,
Expand Down Expand Up @@ -127,7 +127,7 @@ class DataDecorator extends StatelessWidget {
child: Container(
padding: const EdgeInsets.all(8.0),
decoration: BoxDecoration(
border: Border.all(color: Theme.of(context).colorScheme.outline),
border: Border.all(color: Theme.of(context).colorScheme.onBackground),
borderRadius: BorderRadius.circular(4.0),
),
child: ListView(
Expand Down Expand Up @@ -285,7 +285,7 @@ class __SelectableTileState extends State<_SelectableTile> {
border: Border.all(
width: 1,
color: _isHovering
? Theme.of(context).colorScheme.outline
? Theme.of(context).colorScheme.onBackground
: Colors.black.withOpacity(0)),
borderRadius: BorderRadius.circular(4.0),
),
Expand Down Expand Up @@ -433,7 +433,7 @@ class ListViewWrapper extends StatelessWidget {
padding: EdgeInsets.only(top: 3.0, bottom: 3.0, right: rightPadding),
child: Container(
decoration: BoxDecoration(
border: Border.all(color: Theme.of(context).colorScheme.outline),
border: Border.all(color: Theme.of(context).colorScheme.onBackground),
borderRadius: BorderRadius.circular(4.0),
),
clipBehavior: Clip.hardEdge,
Expand Down Expand Up @@ -470,7 +470,7 @@ class ListTileWrapper extends StatelessWidget {
),
contentPadding: const EdgeInsets.only(left: 5, right: 5),
selected: isSelected,
selectedTileColor: Theme.of(context).colorScheme.primaryContainer,
selectedTileColor: Theme.of(context).colorScheme.secondary,
title: Label.regular(label),
onTap: onTap,
);
Expand Down
2 changes: 1 addition & 1 deletion lib/widgets/utils/divider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class ThemedDivider extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Divider(
color: Theme.of(context).colorScheme.outline,
color: Theme.of(context).colorScheme.onBackground,
thickness: 1,
height: 1,
);
Expand Down
5 changes: 3 additions & 2 deletions lib/widgets/utils/drawer_menu.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Menu extends ConsumerWidget {
children: [
DrawerHeader(
decoration: BoxDecoration(
color: theme.colorScheme.surface,
color: theme.colorScheme.primary,
),
child: Wrap(
direction: Axis.vertical,
Expand Down Expand Up @@ -56,7 +56,8 @@ class Menu extends ConsumerWidget {
trailing: Switch.adaptive(
// This bool value toggles the switch.
value: showNormals,
activeColor: theme.colorScheme.secondary,
inactiveTrackColor: theme.colorScheme.tertiary,
activeColor: theme.colorScheme.surfaceVariant,
onChanged: (bool value) {
// This is called when the user toggles the switch.
ref.read(showNormalsProvider.notifier).state = value;
Expand Down

0 comments on commit 5529c28

Please sign in to comment.