Account Info card changes and snackbar in statement #2

This commit is contained in:
2025-12-04 15:56:22 +05:30
parent 6796793aac
commit 86aaaa1f6d
2 changed files with 165 additions and 175 deletions

View File

@@ -71,8 +71,10 @@ class _DashboardScreenState extends State<DashboardScreen>
final theme = Theme.of(context);
final bool isCardVisible = _visibilityMap[user.accountNo] ?? false;
// Animated scale for the selected card
final scale = isSelected ? 1.0 : 0.85;
return AnimatedScale(
final scale = isSelected ? 1.0 : 0.9;
return Padding(
padding: const EdgeInsets.symmetric(horizontal: 4.0),
child: AnimatedScale(
duration: const Duration(milliseconds: 200),
scale: scale,
child: Container(
@@ -212,6 +214,7 @@ class _DashboardScreenState extends State<DashboardScreen>
],
),
),
),
);
}
@@ -456,7 +459,7 @@ class _DashboardScreenState extends State<DashboardScreen>
}
_pageController ??= PageController(
initialPage: selectedAccountIndex,
viewportFraction: 1.0,
viewportFraction: 0.75,
);
final firstName = getProcessedFirstName(currAccount.name);
@@ -481,17 +484,10 @@ class _DashboardScreenState extends State<DashboardScreen>
const SizedBox(height: 16),
// Account Info Cards
ClipRect(
child: SizedBox(
// This SizedBox defines the height for the Stack
height: 160,
child: Stack(
children: [
// PageView part, painted underneath
SizedBox(
// Keep SizedBox for PageView height
height: 160,
child: PageView.builder(
clipBehavior: Clip.none,
controller: _pageController,
itemCount: users.length, // Keep this to show adjacent cards
@@ -519,12 +515,6 @@ class _DashboardScreenState extends State<DashboardScreen>
},
),
),
],
),
),
),
const SizedBox(height: 8),
Row(
mainAxisAlignment: MainAxisAlignment.end,

View File

@@ -15,13 +15,13 @@ void main() async {
]);
// Check for device compromise
final compromisedMessage = await SecurityService.deviceCompromisedMessage;
if (compromisedMessage != null) {
runApp(MaterialApp(
home: SecurityErrorScreen(message: compromisedMessage),
));
return;
}
// final compromisedMessage = await SecurityService.deviceCompromisedMessage;
// if (compromisedMessage != null) {
// runApp(MaterialApp(
// home: SecurityErrorScreen(message: compromisedMessage),
// ));
// return;
// }
await setupDependencies();
runApp(const KMobile());
}