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:
asif
2025-09-03 23:49:30 +05:30
parent 85f58c1e25
commit 64e80148a3
17 changed files with 234 additions and 202 deletions

View File

@@ -334,7 +334,8 @@ class _FundTransferAmountScreenState extends State<FundTransferAmountScreen> {
elevation: 0,
margin: const EdgeInsets.symmetric(vertical: 8.0),
child: ListTile(
leading: getBankLogo(widget.creditBeneficiary.bankName),
leading:
getBankLogo(widget.creditBeneficiary.bankName, context),
title: Text(widget.creditBeneficiary.name),
subtitle: Text(widget.creditBeneficiary.accountNo),
),
@@ -367,12 +368,12 @@ class _FundTransferAmountScreenState extends State<FundTransferAmountScreen> {
},
borderRadius: BorderRadius.circular(10),
selectedColor: Theme.of(context).colorScheme.onPrimary,
fillColor: Theme.of(context).primaryColor,
fillColor: Theme.of(context).colorScheme.primary,
color: Theme.of(context).colorScheme.onSurface,
borderColor: Colors.transparent,
selectedBorderColor: Colors.transparent,
splashColor: Theme.of(context).primaryColor,
highlightColor: Theme.of(context).primaryColor,
splashColor: Theme.of(context).colorScheme.primary,
highlightColor: Theme.of(context).colorScheme.primary,
children: [
Padding(
padding: const EdgeInsets.symmetric(
@@ -427,6 +428,7 @@ class _FundTransferAmountScreenState extends State<FundTransferAmountScreen> {
child: Text(AppLocalizations.of(context).proceed),
),
),
const SizedBox(height: 10),
],
),
),

View File

@@ -86,7 +86,7 @@ class _FundTransferBeneficiaryScreenState
leading: CircleAvatar(
radius: 24,
backgroundColor: Colors.transparent,
child: getBankLogo(beneficiary.bankName),
child: getBankLogo(beneficiary.bankName, context),
),
title: Text(beneficiary.name),
subtitle: Column(

View File

@@ -94,7 +94,7 @@ class _TransactionPinScreenState extends State<TransactionPinScreen> {
shape: BoxShape.circle,
border: Border.all(color: Theme.of(context).primaryColor, width: 2),
color: index < _pin.length
? Theme.of(context).primaryColor
? Theme.of(context).colorScheme.primary
: Colors.transparent,
),
);
@@ -142,11 +142,7 @@ class _TransactionPinScreenState extends State<TransactionPinScreen> {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(
AppLocalizations.of(context).tpin,
style:
const TextStyle(color: Colors.black, fontWeight: FontWeight.w500),
),
title: Text(AppLocalizations.of(context).tpin),
centerTitle: false,
),
body: _loading