feat: reuse fetcher (#71)

This commit is contained in:
Li Wei authored and GitHub committed 2023-02-06 20:58:13 +08:00
1 parent 17cb59c606
commit 1a3c8c026b
36 files changed
+475 -297

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
import 'package:gopeed/api/model/options.dart';
import 'package:gopeed/api/model/request.dart';
import 'package:gopeed/api/model/resource.dart';
import 'package:json_annotation/json_annotation.dart';
part 'meta.g.dart';
@JsonSerializable(explicitToJson: true)
class Meta {
Request req;
Resource res;
Options opts;
Meta({
required this.req,
required this.res,
required this.opts,
});
factory Meta.fromJson(Map<String, dynamic> json) => _$MetaFromJson(json);
Map<String, dynamic> toJson() => _$MetaToJson(this);
}