cancelDownload static method

Future<void> cancelDownload(
  1. String modelId
)

Cancel an ongoing download

Implementation

static Future<void> cancelDownload(String modelId) async {
  try {
    await _channel.invokeMethod('cancelDownload', {
      'modelId': modelId,
    });
  } on PlatformException catch (e) {
    throw Exception('Failed to cancel download: ${e.message}');
  }
}