disposeDecoder method
Implementation
@override
Future<bool> disposeDecoder({required String key}) {
final request = KeyRequest(
key: key,
data: Uint8List.fromList([1]),
).writeToBuffer();
final nativeRequest = toPointer(request);
final completer = Completer<bool>();
final port = RawReceivePort();
port.handler = (response) {
port.close();
completer.complete(response);
};
flutterAvifFFI.dispose_decoder(
port.sendPort.nativePort,
nativeRequest[0],
nativeRequest[1],
);
malloc.free(nativeRequest[0]);
return completer.future;
}