compileModel method
MLModel.compileModel(at:). Compiles a .mlmodel or .mlpackage to a
.mlmodelc directory. When destinationPath is given the result is
moved there (replacing anything already at that path) and that path is
returned; otherwise Core ML's temporary path is returned.
Implementation
Future<String> compileModel(String path, String? destinationPath) async {
final pigeonVar_channelName =
'dev.flutter.pigeon.core_ml.CoreMLHostApi.compileModel$pigeonVar_messageChannelSuffix';
final pigeonVar_channel = BasicMessageChannel<Object?>(
pigeonVar_channelName,
pigeonChannelCodec,
binaryMessenger: pigeonVar_binaryMessenger,
);
final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(
<Object?>[path, destinationPath],
);
final pigeonVar_replyList = await pigeonVar_sendFuture as List<Object?>?;
final Object? pigeonVar_replyValue = _extractReplyValueOrThrow(
pigeonVar_replyList,
pigeonVar_channelName,
isNullValid: false,
);
return pigeonVar_replyValue! as String;
}