callApi method

Future<ReturnData> callApi({
  1. required String functionName,
  2. String? parameter,
  3. bool showLoading = true,
  4. bool showError = true,
})

Implementation

Future<ReturnData> callApi({
  required String functionName,
  String? parameter,
  bool showLoading = true,
  bool showError = true,
}) {
  final dataPost = CyberDataPost(
    functionName: functionName,
    strParameter: parameter,
  );

  return CyberApiService().callApi(
    context: this,
    dataPost: dataPost,
    showLoading: showLoading,
    showError: showError,
  );
}