mirror of
https://ghfast.top/https://github.com/StarCitizenToolBox/app.git
synced 2025-06-29 09:13:05 +08:00
从网络获取下载地址
This commit is contained in:
@ -58,7 +58,7 @@ class DownloadsUI extends BaseUI<DownloadsUIModel> {
|
||||
child: ListView.builder(
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
final (task, type, isFirstType) = model.getTaskAndType(index);
|
||||
final nt = model.getTaskTypeAndName(task);
|
||||
final nt = DownloadsUIModel.getTaskTypeAndName(task);
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
|
@ -110,7 +110,7 @@ class DownloadsUIModel extends BaseUIModel {
|
||||
throw Exception("Index out of range or element is null");
|
||||
}
|
||||
|
||||
MapEntry<String, String> getTaskTypeAndName(Aria2Task task) {
|
||||
static MapEntry<String, String> getTaskTypeAndName(Aria2Task task) {
|
||||
if (task.bittorrent == null) {
|
||||
String uri = task.files?[0]['uris'][0]['uri'] as String;
|
||||
return MapEntry("url", uri.split('/').last);
|
||||
|
Reference in New Issue
Block a user