isDownloadCompleted method

Future<void> isDownloadCompleted(
  1. String url,
  2. void onData(
    1. bool isDownloadCompleted
    )
)

Implementation

Future<void> isDownloadCompleted(
    String url, void Function(bool isDownloadCompleted) onData) async {
  try {
    final bool result = await methodChannel.invokeMethod(
        Constant.METHOD_CHECK_IS_DOWNLOAD, url);
    onData.call(result);
  } on PlatformException catch (_) {}
}