refactored the balacnce card to remove unnecessary things

This commit is contained in:
asif
2025-08-29 22:36:38 +05:30
parent 83ed973b44
commit 6724d8bed0

View File

@@ -298,10 +298,10 @@ class _DashboardScreenState extends State<DashboardScreen> {
Row( Row(
children: [ children: [
Text( Text(
"${AppLocalizations.of(context).accountNumber}: ", "${getFullAccountType(currAccount.accountType)}: ",
style: TextStyle( style: TextStyle(
color: theme.colorScheme.onPrimary, color: theme.colorScheme.onPrimary,
fontSize: 12, fontSize: 16,
), ),
), ),
DropdownButton<int>( DropdownButton<int>(
@@ -312,7 +312,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
iconEnabledColor: theme.colorScheme.onPrimary, iconEnabledColor: theme.colorScheme.onPrimary,
style: TextStyle( style: TextStyle(
color: theme.colorScheme.onPrimary, color: theme.colorScheme.onPrimary,
fontSize: 14, fontSize: 16,
), ),
items: List.generate(users.length, (index) { items: List.generate(users.length, (index) {
return DropdownMenuItem<int>( return DropdownMenuItem<int>(
@@ -321,7 +321,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
users[index].accountNo ?? 'N/A', users[index].accountNo ?? 'N/A',
style: TextStyle( style: TextStyle(
color: theme.colorScheme.onPrimary, color: theme.colorScheme.onPrimary,
fontSize: 14, fontSize: 16,
), ),
), ),
); );
@@ -365,7 +365,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
), ),
) )
: Icon( : Icon(
Icons.refresh, Symbols.refresh,
color: theme.colorScheme.onPrimary, color: theme.colorScheme.onPrimary,
), ),
onPressed: isRefreshing onPressed: isRefreshing
@@ -375,14 +375,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
), ),
], ],
), ),
Text( const SizedBox(height: 15),
getFullAccountType(currAccount.accountType),
style: TextStyle(
color: theme.colorScheme.onPrimary,
fontSize: 16,
),
),
const SizedBox(height: 4),
Row( Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
@@ -400,7 +393,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
isVisible isVisible
? currAccount.currentBalance ?? ? currAccount.currentBalance ??
'0.00' '0.00'
: '********', : '*****',
style: TextStyle( style: TextStyle(
color: theme.colorScheme.onPrimary, color: theme.colorScheme.onPrimary,
fontSize: 40, fontSize: 40,
@@ -428,6 +421,8 @@ class _DashboardScreenState extends State<DashboardScreen> {
}); });
} }
}, },
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Icon( child: Icon(
isVisible isVisible
? Symbols.visibility_lock ? Symbols.visibility_lock
@@ -436,6 +431,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
weight: 800, weight: 800,
), ),
), ),
),
], ],
), ),
const SizedBox(height: 15), const SizedBox(height: 15),