referralHistoryCard method
Implementation
Widget referralHistoryCard() {
return LayoutBuilder(
builder: (context, constraints) {
return Padding(
padding: EdgeInsets.only(
top: 27, left: navigator!.context.width < 1200 ? 0 : 24),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// Title
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
const Text(
'Referral History',
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.w600,
color: ColorHelper.neutralText,
),
),
Container(
padding:
const EdgeInsets.symmetric(horizontal: 6.0, vertical: 6.0),
decoration: BoxDecoration(
color: ColorHelper.lightGrey, // Light green background
borderRadius: BorderRadius.circular(8),
),
child: Icon(
Icons.sort,
size: 18,
color: Colors.grey[700],
),
),
],
),
10.SpaceX,
// Details Card
SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: Container(
width: max(constraints.maxWidth - 44.dp, 500.dp),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(16),
border: Border.all(color: ColorHelper.grey01, width: 1),
color: Colors.white),
child: Table(
columnWidths: const {
0: FlexColumnWidth(0.5),
1: FlexColumnWidth(1),
2: FlexColumnWidth(1),
3: FlexColumnWidth(0.5),
4: FlexColumnWidth(1),
},
children: [
TableRow(
decoration: const BoxDecoration(
color: ColorHelper.lightBg02,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(16),
topRight: Radius.circular(16),
)),
children: [
tableLabel('#'),
tableLabel('FullName'),
tableLabel('Date'),
tableLabel('level'),
tableLabel('Profit'),
],
),
buildReferralHistoryTableRow(
'Terry Doe', '09-0802024', '2', '\$ 2500', 0),
buildReferralHistoryTableRow(
'Terry Doe', '09-0802024', '2', '\$ 2500', 1),
buildReferralHistoryTableRow(
'Terry Doe', '09-0802024', '2', '\$ 2500', 2),
buildReferralHistoryTableRow(
'Terry Doe', '09-0802024', '2', '\$ 2500', 3),
buildReferralHistoryTableRow(
'Terry Doe', '09-0802024', '2', '\$ 2500', 4),
buildReferralHistoryTableRow(
'Terry Doe', '09-0802024', '2', '\$ 2500', 5),
],
),
),
),
],
),
);
}
);
}