Account Info card changes and snackbar in statement
This commit is contained in:
@@ -65,48 +65,7 @@ class _DashboardScreenState extends State<DashboardScreen>
|
||||
});
|
||||
}
|
||||
|
||||
Widget _buildViewAllTab(List<User> users) {
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => AllAccountsScreen(users: users),
|
||||
),
|
||||
);
|
||||
},
|
||||
child: Container(
|
||||
width: 40, // Small width for the tab
|
||||
height: 160,
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).colorScheme.surfaceVariant,
|
||||
),
|
||||
child: const Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
"View",
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 12,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
"All",
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 12,
|
||||
),
|
||||
),
|
||||
Icon(
|
||||
Icons.arrow_forward_ios,
|
||||
size: 16,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Widget _buildAccountCard(User user, bool isSelected) {
|
||||
final theme = Theme.of(context);
|
||||
@@ -116,10 +75,7 @@ class _DashboardScreenState extends State<DashboardScreen>
|
||||
return AnimatedScale(
|
||||
duration: const Duration(milliseconds: 200),
|
||||
scale: scale,
|
||||
child: Transform.translate(
|
||||
offset: isSelected ? const Offset(10.0, 0.0) : Offset.zero,
|
||||
child: Container(
|
||||
margin: const EdgeInsets.symmetric(horizontal: 2),
|
||||
child: Container(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 18,
|
||||
vertical: 10,
|
||||
@@ -256,8 +212,7 @@ class _DashboardScreenState extends State<DashboardScreen>
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> _refreshAccountData(BuildContext context) async {
|
||||
@@ -501,7 +456,7 @@ class _DashboardScreenState extends State<DashboardScreen>
|
||||
}
|
||||
_pageController ??= PageController(
|
||||
initialPage: selectedAccountIndex,
|
||||
viewportFraction: 0.80,
|
||||
viewportFraction: 1.0,
|
||||
);
|
||||
final firstName = getProcessedFirstName(currAccount.name);
|
||||
|
||||
@@ -533,18 +488,13 @@ class _DashboardScreenState extends State<DashboardScreen>
|
||||
child: Stack(
|
||||
children: [
|
||||
// PageView part, painted underneath
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(
|
||||
left: 48.0), // Space for tab (40) + gap (8)
|
||||
child: SizedBox(
|
||||
SizedBox(
|
||||
// Keep SizedBox for PageView height
|
||||
height: 160,
|
||||
child: PageView.builder(
|
||||
controller: _pageController,
|
||||
itemCount: users.length,
|
||||
clipBehavior: Clip
|
||||
.none, // Keep this to show adjacent cards
|
||||
padEnds: false,
|
||||
itemCount: users.length, // Keep this to show adjacent cards
|
||||
|
||||
onPageChanged: (int newIndex) async {
|
||||
if (newIndex == selectedAccountIndex)
|
||||
return;
|
||||
@@ -569,16 +519,36 @@ class _DashboardScreenState extends State<DashboardScreen>
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
// View All tab part, painted on top
|
||||
Align(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: _buildViewAllTab(users),
|
||||
),
|
||||
|
||||
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => AllAccountsScreen(users: users),
|
||||
),
|
||||
);
|
||||
},
|
||||
child: Text(
|
||||
AppLocalizations.of(context).viewall,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: theme.colorScheme.primary,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 18),
|
||||
Text(
|
||||
AppLocalizations.of(context).quickLinks,
|
||||
|
||||
Reference in New Issue
Block a user