mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-08 09:30:27 +00:00
feat: ui improvement
flutter 3.7 compatibility responsive view beautiful progress bar select file in treeview downlading and downloaded page
This commit is contained in:
1 parent
a875a9258e
commit
9b1ed15fea
28 files changed
+932
-439
No files matched your search
@@ -7,6 +7,7 @@ class Resource {
|
||||
String name;
|
||||
int size;
|
||||
bool range;
|
||||
String rootDir;
|
||||
List<FileInfo> files;
|
||||
String hash;
|
||||
|
||||
@@ -14,6 +15,7 @@ class Resource {
|
||||
{required this.name,
|
||||
required this.size,
|
||||
required this.range,
|
||||
required this.rootDir,
|
||||
required this.files,
|
||||
required this.hash});
|
||||
|
||||
@@ -25,17 +27,20 @@ class Resource {
|
||||
|
||||
@JsonSerializable()
|
||||
class FileInfo {
|
||||
String name;
|
||||
// String rootDir;
|
||||
String path;
|
||||
String name;
|
||||
int size;
|
||||
|
||||
FileInfo({
|
||||
required this.name,
|
||||
// required this.rootDir,
|
||||
required this.path,
|
||||
required this.name,
|
||||
required this.size,
|
||||
});
|
||||
|
||||
factory FileInfo.fromJson(Map<String, dynamic> json) =>
|
||||
_$FileInfoFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$FileInfoToJson(this);
|
||||
}
|
||||
@@ -10,6 +10,7 @@ Resource _$ResourceFromJson(Map<String, dynamic> json) => Resource(
|
||||
name: json['name'] as String,
|
||||
size: json['size'] as int,
|
||||
range: json['range'] as bool,
|
||||
rootDir: json['rootDir'] as String,
|
||||
files: (json['files'] as List<dynamic>)
|
||||
.map((e) => FileInfo.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
@@ -20,18 +21,19 @@ Map<String, dynamic> _$ResourceToJson(Resource instance) => <String, dynamic>{
|
||||
'name': instance.name,
|
||||
'size': instance.size,
|
||||
'range': instance.range,
|
||||
'rootDir': instance.rootDir,
|
||||
'files': instance.files.map((e) => e.toJson()).toList(),
|
||||
'hash': instance.hash,
|
||||
};
|
||||
|
||||
FileInfo _$FileInfoFromJson(Map<String, dynamic> json) => FileInfo(
|
||||
name: json['name'] as String,
|
||||
path: json['path'] as String,
|
||||
name: json['name'] as String,
|
||||
size: json['size'] as int,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$FileInfoToJson(FileInfo instance) => <String, dynamic>{
|
||||
'name': instance.name,
|
||||
'path': instance.path,
|
||||
'name': instance.name,
|
||||
'size': instance.size,
|
||||
};
|
||||
Reference in new issue
Block a user