-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
662db36
commit b28fa96
Showing
21 changed files
with
564 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| "dynamic_id": 755129313256275991, | ||
| "pictures": "$[]picture", | ||
| "sent_at": 1674655644 | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| { | ||
| "img_height": 736, | ||
| "img_size": 142.8000030517578, | ||
| "img_width": 728, | ||
| "img_src": "https://i0.hdslb.com/bfs/new_dyn/bcae4133696af428e6a0cc06efa11a37402993775.jpg" | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| "page": 1, | ||
| "total": 1, | ||
| "result": "$[]dynamic" | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| import 'package:json_annotation/json_annotation.dart'; | ||
| import "picture.dart"; | ||
| part 'dynamic.g.dart'; | ||
|
|
||
| @JsonSerializable() | ||
| class Dynamic { | ||
| Dynamic(); | ||
|
|
||
| late num dynamic_id; | ||
| late List<Picture> pictures; | ||
| late num sent_at; | ||
|
|
||
| factory Dynamic.fromJson(Map<String,dynamic> json) => _$DynamicFromJson(json); | ||
| Map<String, dynamic> toJson() => _$DynamicToJson(this); | ||
| } |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,7 @@ | ||
| export 'cacheConfig.dart' ; | ||
| export 'dynamic.dart' ; | ||
| export 'picture.dart' ; | ||
| export 'pictures.dart' ; | ||
| export 'version.dart' ; | ||
| export 'video.dart' ; | ||
| export 'videos.dart' ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| import 'package:json_annotation/json_annotation.dart'; | ||
|
|
||
| part 'picture.g.dart'; | ||
|
|
||
| @JsonSerializable() | ||
| class Picture { | ||
| Picture(); | ||
|
|
||
| late num img_height; | ||
| late num img_size; | ||
| late num img_width; | ||
| late String img_src; | ||
|
|
||
| factory Picture.fromJson(Map<String,dynamic> json) => _$PictureFromJson(json); | ||
| Map<String, dynamic> toJson() => _$PictureToJson(this); | ||
| } |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| import 'package:json_annotation/json_annotation.dart'; | ||
| import "dynamic.dart"; | ||
|
|
||
| part 'pictures.g.dart'; | ||
|
|
||
| enum PicturePageType { | ||
| latest, | ||
| recommend, | ||
| } | ||
|
|
||
| @JsonSerializable() | ||
| class Pictures { | ||
| Pictures(); | ||
|
|
||
| late num page; | ||
| late num total; | ||
| late List<Dynamic> result; | ||
|
|
||
| factory Pictures.fromJson(Map<String, dynamic> json) => | ||
| _$PicturesFromJson(json); | ||
|
|
||
| Map<String, dynamic> toJson() => _$PicturesToJson(this); | ||
| } |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| import 'package:json_annotation/json_annotation.dart'; | ||
|
|
||
| part 'picturesRequest.g.dart'; | ||
|
|
||
| enum PicturesTopic { | ||
| @JsonValue(29067608) | ||
| zao(id: 29067608, label: 'zao'), | ||
| @JsonValue(29069147) | ||
| mi(id: 29069147, label: 'mi'), | ||
| @JsonValue(28953983) | ||
| wan(id: 28953983, label: 'wan'), | ||
| @JsonValue(28948378) | ||
| mo(id: 28948378, label: 'mo'), | ||
| @JsonValue(28950030) | ||
| un(id: 28950030, label: 'un'), | ||
| @JsonValue(29156150) | ||
| eoe(id: 29156150, label: 'eoe'), | ||
| @JsonValue(0) | ||
| all(id: 0, label: 'all'); | ||
|
|
||
| final int id; | ||
| final String label; | ||
|
|
||
| const PicturesTopic({ | ||
| required this.id, | ||
| required this.label, | ||
| }); | ||
|
|
||
| /// 解析从后台传来的值 | ||
| static PicturesTopic parse(int i) { | ||
| return PicturesTopic.values[i]; | ||
| } | ||
| } | ||
|
|
||
| @JsonSerializable() | ||
| class PicturesRequest { | ||
| PicturesRequest(); | ||
|
|
||
| late PicturesTopic topic_id; | ||
| late num page; | ||
|
|
||
| factory PicturesRequest.fromJson(Map<String, dynamic> json) => | ||
| _$PicturesRequestFromJson(json); | ||
|
|
||
| Map<String, dynamic> toJson() => _$PicturesRequestToJson(this); | ||
| } |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.