callAPI method

Future<TUIValueCallBack<String>> callAPI(
  1. String apiName,
  2. String jsonParam
)

Implementation

Future<TUIValueCallBack<String>> callAPI(String apiName, String jsonParam) {
  String userData = Tools.generateUserData();
  Completer<TUIValueCallBack<String>> completer = Completer();
  _valueCallback2Future<String>(userData, completer);
  _engineSDK.Dart_CallAPI(
      _engineFFIPointer,
      Tools.string2PointerChar(apiName),
      Tools.string2PointerChar(jsonParam),
      Tools.string2PointerChar(userData));
  return completer.future;
}