Skip to content

Commit

Permalink
Merge pull request #156 from enrique-lozano/feat/ui-improvements
Browse files Browse the repository at this point in the history
Remove the filled color on the dashboard header trending value
  • Loading branch information
enrique-lozano authored May 1, 2024
2 parents df82ec0 + 55675b7 commit eeed4d4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 1 addition & 2 deletions lib/app/home/dashboard.page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,8 @@ class _DashboardPageState extends State<DashboardPage> {

return TrendingValue(
percentage: snapshot.data!,
filled: true,
fontWeight: FontWeight.bold,
outlined: true,
fontSize: 16,
);
},
),
Expand Down
8 changes: 6 additions & 2 deletions lib/core/presentation/widgets/trending_value.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'package:flutter/material.dart';
import 'package:monekin/core/presentation/widgets/number_ui_formatters/ui_number_formatter.dart';
import 'package:monekin/core/extensions/color.extensions.dart';
import 'package:monekin/core/presentation/widgets/number_ui_formatters/ui_number_formatter.dart';

import '../app_colors.dart';

Expand Down Expand Up @@ -59,7 +59,11 @@ class TrendingValue extends StatelessWidget {

Color _getColorBasedOnPercentage(BuildContext context) {
return percentage == 0
? AppColors.of(context).brand.lighten(0.35).withBlue(225)
? AppColors.of(context)
.brand
.lighten(
Theme.of(context).brightness == Brightness.dark ? 0.45 : 0.25)
.withBlue(225)
: percentage > 0
? AppColors.of(context).success
: AppColors.of(context).danger;
Expand Down

0 comments on commit eeed4d4

Please sign in to comment.