Skip to content

Commit

Permalink
fix: color for player stats card
Browse files Browse the repository at this point in the history
  • Loading branch information
tusharlock10 committed Mar 31, 2024
1 parent 5700975 commit 8ec345d
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/providers/players.dart
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ class _PlayersNotifier extends ChangeNotifier {
playerStreak = utilities.getPlayerStreak(combinedMatches!, playerId);
timedStats = utilities.getPlayerTimedStats(
combinedMatches!,
data_classes.TimedStatsType.days1,
data_classes.TimedStatsType.days30,
playerId,
);
}
Expand Down
5 changes: 3 additions & 2 deletions lib/screens/home/home_player_timed_stats.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ class HomePlayerTimedStats extends HookConsumerWidget {
final playerNotifier = providers.players(playerId);
final playerProvider = ref.read(playerNotifier);
final timedStats = ref.watch(playerNotifier.select((_) => _.timedStats));
final isPlayerMatchesLoading =
ref.watch(playerNotifier.select((_) => _.isPlayerMatchesLoading));
final isPlayerMatchesLoading = ref.watch(
playerNotifier.select((_) => _.isPlayerMatchesLoading),
);

// Effects
useEffect(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import "package:paladinsedge/data_classes/match/index.dart";
import "package:paladinsedge/models/index.dart" as models;
import "package:paladinsedge/providers/index.dart" as providers;
import "package:paladinsedge/screens/index.dart" as screens;
import "package:paladinsedge/theme/index.dart" as theme;
import "package:paladinsedge/utilities/index.dart" as utilities;
import "package:paladinsedge/widgets/index.dart" as widgets;

Expand Down Expand Up @@ -235,7 +236,8 @@ class _RecentPartyMemberCard extends HookWidget {
width: itemWidth,
child: DecoratedBox(
decoration: BoxDecoration(
color: Colors.white.withOpacity(isLightTheme ? 0.75 : 0.25),
color: theme.playerStatsCardColor
.withOpacity(isLightTheme ? 0.75 : 0.25),
borderRadius: const BorderRadius.all(Radius.circular(12)),
),
child: Padding(
Expand Down Expand Up @@ -343,7 +345,8 @@ class _RecentlyPlayedChampionCard extends HookWidget {
width: itemWidth,
child: DecoratedBox(
decoration: BoxDecoration(
color: Colors.white.withOpacity(isLightTheme ? 0.75 : 0.25),
color: theme.playerStatsCardColor
.withOpacity(isLightTheme ? 0.75 : 0.25),
borderRadius: const BorderRadius.all(Radius.circular(12)),
),
child: Padding(
Expand Down
2 changes: 2 additions & 0 deletions lib/theme/colors.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,5 @@ const darkThemeMaterialColor = MaterialColor(0xFF04161c, _darkColorValues);

const subtleLightThemeColor = Color.fromRGBO(65, 189, 232, 1);
const subtleDarkThemeColor = Color.fromRGBO(100, 120, 130, 1);

const playerStatsCardColor = Color(0xfff0f0f3);
4 changes: 3 additions & 1 deletion lib/widgets/player_stats_card.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import "package:flutter/material.dart";
import "package:paladinsedge/theme/index.dart" as theme;
import "package:paladinsedge/utilities/index.dart" as utilities;

class PlayerStatsCard extends StatelessWidget {
Expand Down Expand Up @@ -34,7 +35,8 @@ class PlayerStatsCard extends StatelessWidget {
width: itemWidth,
child: DecoratedBox(
decoration: BoxDecoration(
color: Colors.white.withOpacity(isLightTheme ? 0.75 : 0.25),
color:
theme.playerStatsCardColor.withOpacity(isLightTheme ? 0.5 : 0.25),
borderRadius: const BorderRadius.all(Radius.circular(10)),
),
child: Column(
Expand Down

0 comments on commit 8ec345d

Please sign in to comment.