Skip to content

Commit

Permalink
Add search tags
Browse files Browse the repository at this point in the history
  • Loading branch information
AhsanSarwar45 committed Dec 13, 2023
1 parent 349b431 commit 95b026e
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 26 deletions.
64 changes: 38 additions & 26 deletions lib/settings/data/settings_schema.dart
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ SettingGroup appSettings = SettingGroup(
[
CustomSetting(
"Color Scheme",
description:
"Select from predefined color schemes or create your own",
defaultColorScheme,
(context, setting) => ThemesScreen(
saveTag: 'color_schemes',
Expand All @@ -152,30 +154,27 @@ SettingGroup appSettings = SettingGroup(
},
searchTags: ["theme", "style", "visual", "dark mode"],
),
SwitchSetting(
"Override Accent Color",
false,
onChange: (context, value) {
App.setColorScheme(context);
},
),
ColorSetting(
"Accent Color",
Colors.cyan,
onChange: (context, color) {
App.setColorScheme(context);
},
enableConditions: [
SettingEnableConditionParameter("Override Accent Color", true)
],
),
SwitchSetting("Override Accent Color", false,
onChange: (context, value) {
App.setColorScheme(context);
}, searchTags: ["primary", "color"]),
ColorSetting("Accent Color", Colors.cyan,
onChange: (context, color) {
App.setColorScheme(context);
}, enableConditions: [
SettingEnableConditionParameter("Override Accent Color", true)
], searchTags: [
"primary",
"color"
]),
],
),
SettingGroup(
"Style",
[
CustomSetting<StyleTheme>(
"Style Theme",
description: "Change styles like shadows, outlines and opacities",
defaultStyleTheme,
(context, setting) => ThemesScreen(
saveTag: 'style_themes',
Expand All @@ -191,7 +190,17 @@ SettingGroup appSettings = SettingGroup(
onChange: (context, styleTheme) {
App.setStyleTheme(context, styleTheme);
},
searchTags: ["scheme", "visual"],
searchTags: [
"scheme",
"visual",
"shadow",
"outline",
"elevation",
"card",
"border",
"opacity",
"blur"
],
),
],
),
Expand All @@ -208,7 +217,9 @@ SettingGroup appSettings = SettingGroup(
description: "Set default settings for new alarms",
icon: Icons.settings,
),
SelectSetting<NotificationAction>("Dismiss Action Type", [
SelectSetting<NotificationAction>("Dismiss Action Type", searchTags: [
"action"
], [
SelectSettingOption(
"Slide",
NotificationAction(
Expand Down Expand Up @@ -259,13 +270,13 @@ SettingGroup appSettings = SettingGroup(
"Stopwatch",
[
SettingGroup(
"Time Format",
[
SwitchSetting("Show Milliseconds", true),
],
description: "Show comparison laps bars in stopwatch",
icon: Icons.settings,
),
"Time Format",
[
SwitchSetting("Show Milliseconds", true),
],
description: "Show comparison laps bars in stopwatch",
icon: Icons.settings,
searchTags: ["milliseconds"]),
SettingGroup(
"Comparison Lap Bars",
[
Expand All @@ -276,6 +287,7 @@ SettingGroup appSettings = SettingGroup(
],
description: "Show comparison laps bars in stopwatch",
icon: Icons.settings,
searchTags: ["fastest", "slowest", "average", "previous"],
),
],
icon: FluxIcons.stopwatch,
Expand Down
14 changes: 14 additions & 0 deletions lib/theme/data/default_color_schemes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,18 @@ List<ColorSchemeData> defaultColorSchemes = [
onError: Colors.white,
isDefault: true,
),
ColorSchemeData(
name: 'One Dark Pro',
background: const Color.fromARGB(255, 40, 44, 52),
onBackground: const Color.fromARGB(255, 240, 240, 240),
card: const Color.fromARGB(255, 33, 37, 43),
onCard: const Color.fromARGB(255, 240, 240, 240),
accent: const Color.fromARGB(255, 198, 120, 221),
onAccent: const Color.fromARGB(255, 240, 240, 240),
shadow: const Color.fromARGB(255, 0, 0, 0),
outline: const Color.fromARGB(255, 38, 38, 38),
error: const Color.fromARGB(255, 224, 128, 117),
onError: Colors.white,
isDefault: false,
)
];
10 changes: 10 additions & 0 deletions lib/theme/data/default_style_themes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,14 @@ List<StyleTheme> defaultStyleThemes = [
borderWidth: 1,
isDefault: true,
),
StyleTheme(
name: 'Retro',
shadowElevation: 1,
shadowOpacity: 0.1,
shadowBlurRadius: 2,
shadowSpreadRadius: 1,
borderRadius: 4,
borderWidth: 0,
isDefault: true,
),
];

0 comments on commit 95b026e

Please sign in to comment.