changed primary color usage to fix the color bug in dark mode
Changed Theme.of(context).primaryColor to Theme.of(contex).colorScheme.primary to make dark mode work properly.
This commit is contained in:
@@ -98,7 +98,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
||||
Widget _buildBalanceShimmer() {
|
||||
final theme = Theme.of(context);
|
||||
return Shimmer.fromColors(
|
||||
baseColor: theme.primaryColor,
|
||||
baseColor: theme.colorScheme.primary,
|
||||
highlightColor: theme.colorScheme.onPrimary,
|
||||
child: Container(
|
||||
width: 200, height: 42, color: theme.scaffoldBackgroundColor),
|
||||
@@ -213,7 +213,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
||||
title: Text(
|
||||
AppLocalizations.of(context).kconnect,
|
||||
style: TextStyle(
|
||||
color: theme.primaryColor,
|
||||
color: theme.colorScheme.primary,
|
||||
fontWeight: FontWeight.w700,
|
||||
),
|
||||
),
|
||||
@@ -275,7 +275,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
||||
"${AppLocalizations.of(context).hi} $firstName!",
|
||||
style: GoogleFonts.baumans().copyWith(
|
||||
fontSize: 20,
|
||||
color: theme.primaryColor,
|
||||
color: theme.colorScheme.primary,
|
||||
fontWeight: FontWeight.w700,
|
||||
),
|
||||
),
|
||||
@@ -289,7 +289,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
||||
vertical: 10,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: theme.primaryColor,
|
||||
color: theme.colorScheme.primary,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
child: Column(
|
||||
@@ -307,7 +307,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
||||
),
|
||||
DropdownButton<int>(
|
||||
value: selectedAccountIndex,
|
||||
dropdownColor: theme.primaryColor,
|
||||
dropdownColor: theme.colorScheme.primary,
|
||||
underline: const SizedBox(),
|
||||
icon: const Icon(Icons.keyboard_arrow_down),
|
||||
iconEnabledColor: theme.colorScheme.onPrimary,
|
||||
@@ -602,7 +602,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
||||
AppLocalizations.of(context).noTransactions,
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
color: Colors.grey[600],
|
||||
color: Theme.of(context).colorScheme.outline,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -663,8 +663,8 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
||||
icon,
|
||||
size: 30,
|
||||
color: disable
|
||||
? theme.colorScheme.surfaceContainerHighest
|
||||
: theme.primaryColor,
|
||||
? theme.colorScheme.onSurface.withValues(alpha: 0.3)
|
||||
: theme.colorScheme.primary,
|
||||
grade: 200,
|
||||
weight: 700,
|
||||
),
|
||||
|
Reference in New Issue
Block a user