Skip to content

Commit

Permalink
Add theme
Browse files Browse the repository at this point in the history
  • Loading branch information
AhsanSarwar45 committed Dec 12, 2023
1 parent 7379095 commit f0ca436
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/common/widgets/customize_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class _CustomizeScreenState<Item extends CustomizableListItem>
context: context,
builder: (buildContext) {
return AlertDialog(
actionsPadding: const EdgeInsets.only(bottom: 2, right: 2),
actionsPadding: const EdgeInsets.only(bottom: 6, right: 10),
content: const Text("Do you want to leave without saving?"),
actions: [
TextButton(
Expand Down
13 changes: 13 additions & 0 deletions lib/theme/data/default_color_schemes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,17 @@ List<ColorSchemeData> defaultColorSchemes = [
onError: Colors.white,
isDefault: true,
),
ColorSchemeData(
name: 'Ocean',
background: const Color.fromARGB(255, 248, 249, 250),
onBackground: const Color.fromARGB(255, 48, 48, 49),
card: const Color.fromARGB(255, 255, 255, 255),
onCard: const Color.fromARGB(255, 48, 48, 49),
accent: const Color.fromARGB(255, 34, 102, 238),
onAccent: const Color.fromARGB(255, 196, 219, 255),
shadow: const Color.fromARGB(255, 0, 0, 0),
outline: const Color.fromARGB(255, 235, 235, 235),
error: const Color(0xFFFE4A49),
onError: Colors.white,
isDefault: true)
];
12 changes: 11 additions & 1 deletion lib/theme/data/default_style_themes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import 'package:clock_app/theme/types/style_theme.dart';

List<StyleTheme> defaultStyleThemes = [
StyleTheme(
name: 'Default',
name: 'Paper',
shadowElevation: 1,
shadowOpacity: 0.2,
shadowBlurRadius: 1,
Expand Down Expand Up @@ -31,4 +31,14 @@ List<StyleTheme> defaultStyleThemes = [
borderWidth: 0,
isDefault: true,
),
StyleTheme(
name: 'Outline',
shadowElevation: 0,
shadowOpacity: 0,
shadowBlurRadius: 0,
shadowSpreadRadius: 0,
borderRadius: 16,
borderWidth: 1,
isDefault: true,
),
];
2 changes: 1 addition & 1 deletion lib/theme/slider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ SliderThemeData getSliderTheme(ColorSchemeData colorScheme) {
return SliderThemeData(
// trackShape: CustomTrackShape(),
overlayShape: SliderComponentShape.noOverlay,
inactiveTrackColor: colorScheme.onBackground.withOpacity(0.3)
inactiveTrackColor: colorScheme.onBackground.withOpacity(0.2)

// overlayShape: RoundSliderOverlayShape(overlayRadius: 16),
);
Expand Down
4 changes: 2 additions & 2 deletions lib/theme/switch.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ SwitchThemeData getSwitchTheme(ColorSchemeData colorScheme) {
trackColor: MaterialStateProperty.resolveWith((states) =>
states.contains(MaterialState.selected)
? colorScheme.accent
: colorScheme.onBackground.withOpacity(0.4)),
: colorScheme.onBackground.withOpacity(0.3)),
overlayColor: MaterialStateProperty.resolveWith((states) =>
states.contains(MaterialState.selected)
? colorScheme.accent
: colorScheme.onBackground.withOpacity(0.4)),
: colorScheme.onBackground.withOpacity(0.3)),
trackOutlineColor: MaterialStateProperty.resolveWith((states) =>
states.contains(MaterialState.selected)
? colorScheme.accent
Expand Down

0 comments on commit f0ca436

Please sign in to comment.