mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-08 23:18:16 -07:00
16 lines
592 B
Dart
16 lines
592 B
Dart
import 'package:background_downloader/background_downloader.dart';
|
|
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
|
|
|
part 'background_download_provider.g.dart';
|
|
|
|
@Riverpod(keepAlive: true)
|
|
FileDownloader backgroundDownloader(BackgroundDownloaderRef ref) {
|
|
return FileDownloader()
|
|
..trackTasks()
|
|
..configureNotification(
|
|
running: TaskNotification('Downloading', 'file: {filename}'),
|
|
complete: TaskNotification('Download finished', 'file: {filename}'),
|
|
paused: TaskNotification('Download paused', 'file: {filename}'),
|
|
progressBar: true,
|
|
);
|
|
}
|