媒体库上拉刷新,下拉加载

This commit is contained in:
rang 2025-12-30 17:02:28 +08:00
parent bdd85efcd8
commit ebcbe1774a
20 changed files with 351 additions and 126 deletions

View file

@ -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

View file

@ -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)