mirror of
https://github.com/Dr-Blank/Vaani.git
synced 2026-04-19 20:59:36 +00:00
媒体库上拉刷新,下拉加载
This commit is contained in:
parent
bdd85efcd8
commit
ebcbe1774a
20 changed files with 351 additions and 126 deletions
|
|
@ -1,5 +1,3 @@
|
|||
import 'dart:io';
|
||||
|
||||
import 'package:background_downloader/background_downloader.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
|
|
@ -71,24 +69,6 @@ class DownloadManager extends _$DownloadManager {
|
|||
await state.deleteDownloadedItem(item);
|
||||
ref.notifyListeners();
|
||||
}
|
||||
|
||||
String _getDirectory(String path) {
|
||||
if (Platform.isWindows) {
|
||||
return path;
|
||||
}
|
||||
return path;
|
||||
}
|
||||
|
||||
BaseDirectory _getBaseDirectory() {
|
||||
if (Platform.isIOS) {
|
||||
return BaseDirectory.applicationDocuments;
|
||||
} else if (Platform.isAndroid) {
|
||||
return BaseDirectory.temporary;
|
||||
} else if (Platform.isWindows) {
|
||||
return BaseDirectory.root;
|
||||
}
|
||||
return BaseDirectory.applicationSupport;
|
||||
}
|
||||
}
|
||||
|
||||
@riverpod
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ final simpleDownloadManagerProvider = NotifierProvider<SimpleDownloadManager,
|
|||
);
|
||||
|
||||
typedef _$SimpleDownloadManager = Notifier<core.AudiobookDownloadManager>;
|
||||
String _$downloadManagerHash() => r'92afe484d6735d5de53473011ea9ecbad107fc1c';
|
||||
String _$downloadManagerHash() => r'852012e32e613f86445afc7f7e4e85bec808e982';
|
||||
|
||||
/// See also [DownloadManager].
|
||||
@ProviderFor(DownloadManager)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue