callRecentTransApi method
Implementation
callRecentTransApi(BuildContext context,String mobileNumber) async {
Map<String, dynamic> requestBody = {
"ApplicationType": kglobal.shared.applcationType,
// "EntityID": kglobal.shared.EntityID,
'GeoLocation': kglobal.shared.geolocation,
"MachineID": kglobal.shared.deviceID,
'Mobilenumber': mobileNumber,
'Platform': kglobal.shared.kPlatform,
'ServiceID': '5',
'ReqType': AppUrl.IMPS_Recent_Transaction,
};
String bodyJson = jsonEncode(requestBody);
auth.recentTransaction(context, bodyJson).then((value) {
try {
setTransValue(value);
if (recentTransModel.value.responseCode?.length == 4) {
update();
print('Success');
} else {
kglobal.shared.showSnack(
context,
true,
value.message ?? "",
);
}
} catch (e) {
print(e);
}
});
}