callPartnerDetailsApi method
Implementation
Future<void> callPartnerDetailsApi(String partnerId) async {
BuildContext context = Get.context!;
Helper.progressDialog(context, "Please wait..");
String requestTime = "";
String responseTime = "";
await ApiClient(
baseUrl: ApiConstant.baseUrl,
onFetchRequestTime: (time) {
requestTime = time;
},
onFetchResponseTime: (time) {
responseTime = time;
},
screenName: "checkStock",
)
.getMoreInfo(
dealerId: partnerId,
xUserId: SecureStorageService.readSecureData(
SecureStorageService.xUserId,
) ?? "",
)
.then((response) {
Get.back();
Helper.logEvent(
"RESPONSE_EVENT",
success: true,
endPoint: "${Api.getMoreInfo}/$partnerId",
responseDate: responseTime,
screenName: "checkStock",
requestDate: requestTime,
);
PartnerDetailsModel model = response;
if (model.profile != null) {}
}).catchError((error) {
ConditionalLogs().customLog("$error");
Get.back();
MainController mainController = Get.put(MainController());
mainController.showErrorPopup();
});
}