feat: new ui (#1455)

This commit is contained in:
Levi authored and GitHub committed 2026-09-05 19:53:41 +08:00
1 parent 3be8db664c
commit 177c225f16
742 files changed
+59951 -5934

No files matched your search

@@ -0,0 +1,45 @@
import 'package:gopeed/api/model/request.dart';
import 'package:json_annotation/json_annotation.dart';
part 'resource.g.dart';
@JsonSerializable(explicitToJson: true)
class Resource {
String name;
int size;
bool range;
List<FileInfo> files;
String hash;
Resource(
{this.name = "",
this.size = 0,
this.range = false,
required this.files,
this.hash = ""});
factory Resource.fromJson(Map<String, dynamic> json) =>
_$ResourceFromJson(json);
Map<String, dynamic> toJson() => _$ResourceToJson(this);
}
@JsonSerializable(explicitToJson: true)
class FileInfo {
String path;
String name;
int size;
Request? req;
FileInfo({
this.path = "",
required this.name,
this.size = 0,
this.req,
});
factory FileInfo.fromJson(Map<String, dynamic> json) =>
_$FileInfoFromJson(json);
Map<String, dynamic> toJson() => _$FileInfoToJson(this);
}