bug fixed

This commit is contained in:
nutchayut
2025-01-07 22:38:57 +07:00
parent 5bcc7d636e
commit 97ec586a44
38 changed files with 142 additions and 131 deletions

View File

@@ -82,104 +82,106 @@ class _TopUpHistoryState extends State<TransferHistory> {
@override
Widget build(BuildContext context) {
return ListView.builder(
itemCount: listTrans.length,
shrinkWrap: true,
itemBuilder: (BuildContext context, int index) {
TransferHistoryModel transactions = listTrans[index];
return Padding(
padding: const EdgeInsets.all(10.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
Utils.convertDateToDay(transactions.updateDate ?? "",context),
style: GoogleFonts.kanit(
color: Color(0xff565656),
fontSize: 16,
),
),
Container(
child: Padding(
padding: const EdgeInsets.all(12.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Text(
transactions.paymentChannel ?? "",
style: GoogleFonts.kanit(
color: Color(0xff65676b),
fontSize: 16,
fontWeight: FontWeight.w300,
),
),
Spacer(),
Text(
"${Utils.moneyFormat(transactions.amount ?? "")} ${"Baht".tr()}",
textAlign: TextAlign.right,
style: GoogleFonts.kanit(
color: Color(0xff65676b),
fontSize: 16,
),
)
],
),
SizedBox(
height: 10,
),
Text(
transactions.payeeFullName ?? "",
style: TextStyle(
color: Color(0xff65676b),
fontSize: 16,
),
),
Text(
"To ${transactions.qrId.toString().split('|').toList().length >= 3 ?transactions.qrId.toString().split('|').toList()[3].startsWith('0') ? transactions.qrId.toString().split('|').toList()[3]:"" : "" }" ?? "",
style: TextStyle(
color: Color(0xff65676b),
fontSize: 16,
),
),
Text(
transactions.phoneNumber ?? "",
style: TextStyle(
color: Color(0xff65676b),
fontSize: 16,
),
),
Text(
Utils.convertDateToTime(transactions.updateDate ?? ""),
style: TextStyle(
color: Color(0xff65676b),
fontSize: 14,
fontWeight: FontWeight.w300,
),
),
// Row(
// children: [
// Spacer(),
// Icon(
// Icons.keyboard_arrow_down,
// color: Colors.grey.shade400,
// size: 30,
// )
// ],
// ),
],
return Expanded(
child: ListView.builder(
itemCount: listTrans.length,
shrinkWrap: true,
itemBuilder: (BuildContext context, int index) {
TransferHistoryModel transactions = listTrans[index];
return Padding(
padding: const EdgeInsets.all(10.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
Utils.convertDateToDay(transactions.updateDate ?? "",context),
style: GoogleFonts.kanit(
color: Color(0xff565656),
fontSize: 16,
),
),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
color: Colors.grey.shade100,
Container(
child: Padding(
padding: const EdgeInsets.all(12.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Text(
transactions.paymentChannel ?? "",
style: GoogleFonts.kanit(
color: Color(0xff65676b),
fontSize: 16,
fontWeight: FontWeight.w300,
),
),
Spacer(),
Text(
"${Utils.moneyFormat(transactions.amount ?? "")} ${"Baht".tr()}",
textAlign: TextAlign.right,
style: GoogleFonts.kanit(
color: Color(0xff65676b),
fontSize: 16,
),
)
],
),
SizedBox(
height: 10,
),
Text(
transactions.payeeFullName ?? "",
style: TextStyle(
color: Color(0xff65676b),
fontSize: 16,
),
),
Text(
"To ${transactions.qrId.toString().split('|').toList().length >= 3 ?transactions.qrId.toString().split('|').toList()[3].startsWith('0') ? transactions.qrId.toString().split('|').toList()[3]:"" : "" }" ?? "",
style: TextStyle(
color: Color(0xff65676b),
fontSize: 16,
),
),
Text(
transactions.phoneNumber ?? "",
style: TextStyle(
color: Color(0xff65676b),
fontSize: 16,
),
),
Text(
Utils.convertDateToTime(transactions.updateDate ?? ""),
style: TextStyle(
color: Color(0xff65676b),
fontSize: 14,
fontWeight: FontWeight.w300,
),
),
// Row(
// children: [
// Spacer(),
// Icon(
// Icons.keyboard_arrow_down,
// color: Colors.grey.shade400,
// size: 30,
// )
// ],
// ),
],
),
),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
color: Colors.grey.shade100,
),
),
),
],
),
);
});
],
),
);
}),
);
}
}