mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-14 20:33:41 +00:00
feat: flutter ui integration
This commit is contained in:
1 parent
0fc133e46d
commit
c4a30dc4c2
170 files changed
+7783
-1
No files matched your search
@@ -0,0 +1,44 @@
|
||||
import 'request.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'resource.g.dart';
|
||||
|
||||
@JsonSerializable(explicitToJson: true)
|
||||
class Resource {
|
||||
Request req;
|
||||
String name;
|
||||
int size;
|
||||
bool range;
|
||||
List<FileInfo> files;
|
||||
Map<String, dynamic>? extra;
|
||||
|
||||
Resource({
|
||||
required this.req,
|
||||
required this.name,
|
||||
required this.size,
|
||||
required this.range,
|
||||
required this.files,
|
||||
this.extra,
|
||||
});
|
||||
|
||||
factory Resource.fromJson(Map<String, dynamic> json) =>
|
||||
_$ResourceFromJson(json);
|
||||
Map<String, dynamic> toJson() => _$ResourceToJson(this);
|
||||
}
|
||||
|
||||
@JsonSerializable()
|
||||
class FileInfo {
|
||||
String name;
|
||||
String path;
|
||||
int size;
|
||||
|
||||
FileInfo({
|
||||
required this.name,
|
||||
required this.path,
|
||||
required this.size,
|
||||
});
|
||||
|
||||
factory FileInfo.fromJson(Map<String, dynamic> json) =>
|
||||
_$FileInfoFromJson(json);
|
||||
Map<String, dynamic> toJson() => _$FileInfoToJson(this);
|
||||
}
|
||||
Reference in new issue
Block a user