This commit is contained in:
Hamza-Ayed
2024-06-05 21:53:17 +03:00
parent 22487e138d
commit a3d3090a15
22 changed files with 633 additions and 539 deletions

View File

@@ -52,63 +52,71 @@ class WeeklyPaymentPage extends StatelessWidget {
const SizedBox(
height: 10,
),
SizedBox(
height: Get.height * .8,
child: ListView.builder(
itemCount: controller.weeklyList.length,
itemBuilder: (BuildContext context, int index) {
var list = controller.weeklyList[index];
return Padding(
padding: const EdgeInsets.all(2.0),
child: Container(
decoration: AppStyle.boxDecoration1,
child: Padding(
padding: const EdgeInsets.all(4),
child: Column(
children: [
Card(
elevation: 2,
color: list['paymentMethod'] == 'visa'
? AppColor.blueColor
: AppColor.secondaryColor,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
list['paymentMethod'] == 'Remainder'
? 'Remainder'.tr
: list['paymentMethod'],
style: AppStyle.title,
),
),
),
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Card(
child: Padding(
padding:
const EdgeInsets.all(8.0),
child: Text(
list['amount'],
style: AppStyle.number,
),
Padding(
padding: const EdgeInsets.symmetric(
horizontal: 10, vertical: 5),
child: SizedBox(
height: Get.height * .75,
child: ListView.builder(
itemCount: controller.weeklyList.length,
itemBuilder: (BuildContext context, int index) {
var list = controller.weeklyList[index];
return Padding(
padding: const EdgeInsets.all(2.0),
child: Container(
decoration: AppStyle.boxDecoration1,
child: Padding(
padding: const EdgeInsets.all(4),
child: Column(
children: [
Card(
elevation: 2,
color: list['paymentMethod'] == 'visa'
? AppColor.blueColor
: AppColor.secondaryColor,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
list['paymentMethod'] ==
'Remainder'
? 'Remainder'.tr
: list['paymentMethod'] ==
'fromBudget'
? 'fromBudget'.tr
: list['paymentMethod'],
style: AppStyle.title,
),
),
Text(
DateFormat('yyyy-MM-dd hh:mm a')
.format(DateTime.parse(
list['dateUpdated'])),
style: AppStyle.number,
),
],
),
],
),
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Card(
child: Padding(
padding:
const EdgeInsets.all(8.0),
child: Text(
list['amount'],
style: AppStyle.number,
),
),
),
Text(
DateFormat('yyyy-MM-dd hh:mm a')
.format(DateTime.parse(
list['dateUpdated'])),
style: AppStyle.number,
),
],
),
],
),
),
),
),
);
},
);
},
),
),
),
],