getDropDownReason method

dynamic getDropDownReason(
  1. BuildContext context
)

Implementation

getDropDownReason(BuildContext context) async {
  String requestTime = "";
  String responseTime = "";
  await ApiClient(
    baseUrl: ApiConstant.baseUrl,
    onFetchRequestTime: (time) {
      requestTime = time;
    },
    onFetchResponseTime: (time) {
      responseTime = time;
    },
    screenName: "orderStockHistoryDetails",
  )
      .cpmDropDown(
    dropDownMasterId: 97,
  )
      .then((value) {
    Helper.logEvent(
      "RESPONSE_EVENT",
      success: true,
      endPoint: Api.cpmDropdown,
      responseDate: responseTime,
      screenName: "orderStockHistoryDetails",
      requestDate: requestTime,
    );
    if (value.content != null && value.content!.isNotEmpty) {
      dropDownReasonList = value.content ?? [];
    }
  }).catchError((err) {
    log(err.toString());
  });
}