getFunction method

  1. @override
Future<FunctionDescriptor> getFunction(
  1. String packageId,
  2. String moduleName,
  3. String functionName, {
  4. CancelToken? cancelToken,
})
override

Implementation

@override
Future<FunctionDescriptor> getFunction(
  String packageId,
  String moduleName,
  String functionName, {
  CancelToken? cancelToken,
}) async {
  final req = GetFunctionRequest(
    packageId: await resolvePackage(packageId, cancelToken: cancelToken),
    moduleName: moduleName,
    name: functionName,
  );
  final bytes = await _call(
    _movePackage,
    'GetFunction',
    req.writeToBuffer(),
    cancelToken: cancelToken,
  );
  return GetFunctionResponse.fromBuffer(bytes).function;
}