mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-15 10:15:58 -07:00
Init repo
This commit is contained in:
commit
764b6034e3
566 changed files with 212335 additions and 0 deletions
16
lib/providers/sync/background_download_provider.dart
Normal file
16
lib/providers/sync/background_download_provider.dart
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
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,
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue