Skip to content

Commit 3f56e16

Browse files
Merge branch 'develop'
2 parents 403a6f8 + 8f47304 commit 3f56e16

File tree

6 files changed

+47
-31
lines changed

6 files changed

+47
-31
lines changed

lib/app/accounts/account_form.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ class _AccountFormPageState extends State<AccountFormPage> {
248248
size: 36,
249249
isOutline: true,
250250
outlineWidth: 1.5,
251-
mainColor: _color.lighten(0.82),
251+
mainColor: _color.lighten(IconDisplayer.darkLightenFactor),
252252
secondaryColor: _color,
253253
displayMode: IconDisplayMode.polygon,
254254
),

lib/app/categories/selectors/category_picker.dart

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import 'package:monekin/core/models/category/category.dart';
1010
import 'package:monekin/core/models/supported-icon/icon_displayer.dart';
1111
import 'package:monekin/core/presentation/animations/animated_expanded.dart';
1212
import 'package:monekin/core/presentation/app_colors.dart';
13+
import 'package:monekin/core/presentation/theme.dart';
1314
import 'package:monekin/core/presentation/widgets/bottomSheetFooter.dart';
1415
import 'package:monekin/core/presentation/widgets/modal_container.dart';
1516
import 'package:monekin/core/presentation/widgets/scrollable_with_bottom_gradient.dart';
@@ -188,15 +189,11 @@ class _CategoryPickerState extends State<CategoryPicker> {
188189
.copyWith(fontWeight: FontWeight.w700),
189190
),
190191
),
192+
const SizedBox(height: 4),
191193
buildSubcategoryRow(context, subcategories)
192194
],
193195
),
194196
const SizedBox(height: 8),
195-
const Divider(
196-
thickness: 4,
197-
endIndent: 16,
198-
indent: 16,
199-
),
200197
],
201198
),
202199
);
@@ -219,6 +216,8 @@ class _CategoryPickerState extends State<CategoryPicker> {
219216

220217
SingleChildScrollView buildSubcategoryRow(
221218
BuildContext context, List<Category>? subcategories) {
219+
final isDarkMode = isAppInDarkBrightness(context);
220+
222221
return SingleChildScrollView(
223222
physics: const BouncingScrollPhysics(),
224223
scrollDirection: Axis.horizontal,
@@ -228,6 +227,15 @@ class _CategoryPickerState extends State<CategoryPicker> {
228227
for (final subcat in subcategories ?? []) ...[
229228
ChoiceChip.elevated(
230229
selected: selectedCategory?.id == subcat.id,
230+
shape: RoundedRectangleBorder(
231+
side: BorderSide(
232+
color: selectedCategory?.id == subcat.id
233+
? ColorHex.get(selectedCategory!.color)
234+
: ColorHex.get(selectedCategory!.color).lighten(),
235+
width: 1.5,
236+
),
237+
borderRadius: BorderRadius.circular(12),
238+
),
231239
label: Text(
232240
subcat.name,
233241
style: TextStyle(
@@ -244,7 +252,8 @@ class _CategoryPickerState extends State<CategoryPicker> {
244252
supportedIcon: subcat.icon,
245253
mainColor: selectedCategory?.id == subcat.id
246254
? Colors.white
247-
: ColorHex.get(subcat.color),
255+
: ColorHex.get(subcat.color).lighten(
256+
isDarkMode ? IconDisplayer.darkLightenFactor : 0),
248257
secondaryColor: Colors.transparent,
249258
padding: 0,
250259
),

lib/core/models/account/account.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,10 @@ class Account extends AccountInDB {
9595

9696
return IconDisplayer(
9797
supportedIcon: icon,
98-
mainColor: getComputedColor(context).lighten(isDark ? 0.82 : 0),
99-
secondaryColor: getComputedColor(context).lighten(isDark ? 0 : 0.82),
98+
mainColor: getComputedColor(context)
99+
.lighten(isDark ? IconDisplayer.darkLightenFactor : 0),
100+
secondaryColor: getComputedColor(context)
101+
.lighten(isDark ? 0 : IconDisplayer.darkLightenFactor),
100102
displayMode: IconDisplayMode.polygon,
101103
size: size,
102104
borderRadius: 20,

lib/core/models/supported-icon/icon_displayer.dart

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ enum IconDisplayMode {
1515

1616
@CopyWith()
1717
class IconDisplayer extends StatelessWidget {
18+
static const darkLightenFactor = 0.82;
19+
1820
const IconDisplayer({
1921
super.key,
2022
required this.mainColor,
@@ -51,8 +53,10 @@ class IconDisplayer extends StatelessWidget {
5153
Color categoryColor = ColorHex.get(category.color);
5254

5355
return IconDisplayer(
54-
mainColor: isDark ? categoryColor.lighten(0.82) : categoryColor,
55-
secondaryColor: isDark ? categoryColor : categoryColor.lighten(0.82),
56+
mainColor:
57+
categoryColor.lighten(isDark ? IconDisplayer.darkLightenFactor : 0),
58+
secondaryColor:
59+
categoryColor.lighten(isDark ? 0 : IconDisplayer.darkLightenFactor),
5660
supportedIcon: category.icon,
5761
isOutline: isOutline,
5862
borderRadius: borderRadius,
@@ -86,7 +90,8 @@ class IconDisplayer extends StatelessWidget {
8690
@override
8791
Widget build(BuildContext context) {
8892
final calculatedPadding = padding ?? (size / (22 / 6));
89-
final secondaryColorInBuild = secondaryColor ?? mainColor.lighten(0.82);
93+
final secondaryColorInBuild =
94+
secondaryColor ?? mainColor.lighten(IconDisplayer.darkLightenFactor);
9095

9196
final borderSide = BorderSide(
9297
width: isOutline ? outlineWidth : 0,

pubspec.lock

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -317,10 +317,10 @@ packages:
317317
dependency: "direct main"
318318
description:
319319
name: file_picker
320-
sha256: "824f5b9f389bfc4dddac3dea76cd70c51092d9dff0b2ece7ef4f53db8547d258"
320+
sha256: "825aec673606875c33cd8d3c4083f1a3c3999015a84178b317b7ef396b7384f3"
321321
url: "https://pub.dev"
322322
source: hosted
323-
version: "8.0.6"
323+
version: "8.0.7"
324324
fixnum:
325325
dependency: transitive
326326
description:
@@ -601,18 +601,18 @@ packages:
601601
dependency: transitive
602602
description:
603603
name: leak_tracker
604-
sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a"
604+
sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05"
605605
url: "https://pub.dev"
606606
source: hosted
607-
version: "10.0.4"
607+
version: "10.0.5"
608608
leak_tracker_flutter_testing:
609609
dependency: transitive
610610
description:
611611
name: leak_tracker_flutter_testing
612-
sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8"
612+
sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806"
613613
url: "https://pub.dev"
614614
source: hosted
615-
version: "3.0.3"
615+
version: "3.0.5"
616616
leak_tracker_testing:
617617
dependency: transitive
618618
description:
@@ -649,18 +649,18 @@ packages:
649649
dependency: transitive
650650
description:
651651
name: material_color_utilities
652-
sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
652+
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
653653
url: "https://pub.dev"
654654
source: hosted
655-
version: "0.8.0"
655+
version: "0.11.1"
656656
meta:
657657
dependency: transitive
658658
description:
659659
name: meta
660-
sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136"
660+
sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
661661
url: "https://pub.dev"
662662
source: hosted
663-
version: "1.12.0"
663+
version: "1.15.0"
664664
mime:
665665
dependency: transitive
666666
description:
@@ -681,10 +681,10 @@ packages:
681681
dependency: "direct main"
682682
description:
683683
name: package_info_plus
684-
sha256: "4de6c36df77ffbcef0a5aefe04669d33f2d18397fea228277b852a2d4e58e860"
684+
sha256: a75164ade98cb7d24cfd0a13c6408927c6b217fa60dee5a7ff5c116a58f28918
685685
url: "https://pub.dev"
686686
source: hosted
687-
version: "8.0.1"
687+
version: "8.0.2"
688688
package_info_plus_platform_interface:
689689
dependency: transitive
690690
description:
@@ -1038,10 +1038,10 @@ packages:
10381038
dependency: transitive
10391039
description:
10401040
name: test_api
1041-
sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f"
1041+
sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb"
10421042
url: "https://pub.dev"
10431043
source: hosted
1044-
version: "0.7.0"
1044+
version: "0.7.2"
10451045
timing:
10461046
dependency: transitive
10471047
description:
@@ -1166,10 +1166,10 @@ packages:
11661166
dependency: transitive
11671167
description:
11681168
name: vm_service
1169-
sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec"
1169+
sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d"
11701170
url: "https://pub.dev"
11711171
source: hosted
1172-
version: "14.2.1"
1172+
version: "14.2.5"
11731173
watcher:
11741174
dependency: transitive
11751175
description:

pubspec.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ publish_to: 'none'
1313
# The X represents the major releases, and can be up to infinity. Never start by a zero
1414
# The Y represents the minor releases, and can be up to 99. Always start by a zero
1515
# The Z represents the patch releases, and can be up to 999. Always start by a zero
16-
version: 7.0.0+700000
16+
version: 7.0.1+700001
1717

1818
environment:
1919
flutter: 3.22.3
@@ -51,13 +51,13 @@ dependencies:
5151
permission_handler: ^11.3.0
5252
json_annotation: ^4.8.1
5353
fl_chart: ^0.68.0
54-
file_picker: ^8.0.3
54+
file_picker: ^8.0.7
5555
share_plus: ^9.0.0
5656
url_launcher: ^6.1.11
5757
uuid: ^4.4.2
5858
csv: ^6.0.0
5959
dotted_border: ^2.0.0+3
60-
package_info_plus: ^8.0.1
60+
package_info_plus: ^8.0.2
6161
introduction_screen: ^3.1.11
6262
dynamic_color: ^1.7.0
6363
copy_with_extension: ^5.0.4

0 commit comments

Comments
 (0)