secondDisplay method
Implementation
Widget secondDisplay() {
return Padding(
padding: const EdgeInsets.only(top: 8.0),
child: Column(
children: data.entries.map((e) => Column(
children: [
Container(
width: Get.width,
decoration: BoxDecoration(
color: Colors.white, borderRadius: BorderRadius.circular(10)),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: InkWell(
child: Row(
children: [
CircleAvatar(
radius: 20,
backgroundColor: Colors.transparent,
child: ClipRRect(
borderRadius: BorderRadius.circular(100),
child: Image.asset(e.value,width: 60,height:60,fit: BoxFit.cover,)),
),
Expanded(
child: Align(
alignment: Alignment.centerLeft,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: TextWidget(
text: e.key,
// Format totalAmount to two decimal places
color: greenIntColor,
fontSize: 14,
fontWeight: FontWeight.w500,
textAlign: TextAlign.center,
),
),
),
),
Icon(Icons.navigate_next,color: Color(yellowIntColor),)
],
),
onTap: ()async{
// Get.to(ExpandOnMobileMoney(),arguments: await LocalStorageManager().getFinancialStatus("mobileTransactions"));
},
),
),
),
FutureBuilder(
future: MessageFunction().getMessageDetails(),
builder: (BuildContext context, AsyncSnapshot<dynamic> snapshot) {
if (snapshot.hasData) {
Map data = jsonDecode(snapshot.data['decrypted_data']);
c.saveFinancialStatus("mobileTransactions",
data);
return Column(
children: data.entries.map((e) => ((e.value) as List).isNotEmpty?ListTile(
title: TextWidget(
text: e.key.toString().replaceAll("_", " ").toUpperCase(),
color: greenIntColor,
fontSize: 11,
fontWeight: FontWeight.w600,
textAlign: TextAlign.start,
),
leading: CircleAvatar(
radius: 20,
child: Image.asset(theming[Random().nextInt(4)]['i'],height: 20,),
),
subtitle: e.key!="userID"?valueDisplay(e.value):SizedBox(),
):SizedBox()).toList(),
);
}
return mobileTransactions("mobileTransactions");
},
),
],
)).toList(),
),
);
}