DownloadManager constructor

DownloadManager({
  1. required SafeValueNotifier<AVPTrackInfo?> currentTrackInfoNotifier,
  2. required AliPlayerWidgetData? widgetDataGetter(),
  3. required void showSuccess(
    1. String path
    ),
  4. required void showInfo(
    1. String path
    ),
  5. required void showError(
    1. String path
    ),
})

Implementation

DownloadManager({
  required SafeValueNotifier<AVPTrackInfo?> currentTrackInfoNotifier,
  required AliPlayerWidgetData? Function() widgetDataGetter,
  required void Function(String) showSuccess,
  required void Function(String) showInfo,
  required void Function(String) showError,
})  : _currentTrackInfoNotifier = currentTrackInfoNotifier,
      _widgetDataGetter = widgetDataGetter,
      _showSuccess = showSuccess,
      _showInfo = showInfo,
      _showError = showError {
  _downloader = FlutterAliDownloader.init();
}