-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 使用google-GFSegmentTab,将导航分为:体系,常用网站,公众号三个Tab部分 * 使用google-Stick-header,构建体系页面 * 导航-体系/常用网站/公众号完成
- Loading branch information
Showing
43 changed files
with
1,491 additions
and
533 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
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
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,155 +1,193 @@ | ||
import 'package:json_annotation/json_annotation.dart'; | ||
|
||
part 'navigation_response.g.dart'; | ||
import 'home_article_response.dart'; | ||
|
||
part 'navigation_response.g.dart'; | ||
|
||
///3.1 导航数据 | ||
@JsonSerializable() | ||
class NavigationResponse extends Object { | ||
|
||
@JsonKey(name: 'data') | ||
List<Data> data; | ||
List<NavigatorData> data; | ||
|
||
@JsonKey(name: 'errorCode') | ||
int errorCode; | ||
|
||
@JsonKey(name: 'errorMsg') | ||
String errorMsg; | ||
|
||
NavigationResponse(this.data,this.errorCode,this.errorMsg,); | ||
NavigationResponse( | ||
this.data, | ||
this.errorCode, | ||
this.errorMsg, | ||
); | ||
|
||
factory NavigationResponse.fromJson(Map<String, dynamic> srcJson) => _$NavigationResponseFromJson(srcJson); | ||
factory NavigationResponse.fromJson(Map<String, dynamic> srcJson) => | ||
_$NavigationResponseFromJson(srcJson); | ||
|
||
Map<String, dynamic> toJson() => _$NavigationResponseToJson(this); | ||
|
||
} | ||
|
||
|
||
@JsonSerializable() | ||
class Data extends Object { | ||
|
||
class NavigatorData extends Object { | ||
@JsonKey(name: 'articles') | ||
List<Articles> articles; | ||
List<Article>? articles; | ||
|
||
@JsonKey(name: 'cid') | ||
int cid; | ||
int? cid; | ||
|
||
@JsonKey(name: 'name') | ||
String name; | ||
|
||
Data(this.articles,this.cid,this.name,); | ||
|
||
factory Data.fromJson(Map<String, dynamic> srcJson) => _$DataFromJson(srcJson); | ||
|
||
Map<String, dynamic> toJson() => _$DataToJson(this); | ||
String? name; | ||
|
||
NavigatorData( | ||
{ | ||
this.articles, | ||
this.cid, | ||
this.name, | ||
} | ||
); | ||
|
||
factory NavigatorData.fromJson(Map<String, dynamic> srcJson) => | ||
_$NavigatorDataFromJson(srcJson); | ||
|
||
@JsonSerializable() | ||
class Articles extends Object { | ||
|
||
@JsonKey(name: 'apkLink') | ||
String apkLink; | ||
|
||
@JsonKey(name: 'audit') | ||
int audit; | ||
|
||
@JsonKey(name: 'author') | ||
String author; | ||
|
||
@JsonKey(name: 'canEdit') | ||
bool canEdit; | ||
|
||
@JsonKey(name: 'chapterId') | ||
int chapterId; | ||
|
||
@JsonKey(name: 'chapterName') | ||
String chapterName; | ||
|
||
@JsonKey(name: 'collect') | ||
bool collect; | ||
|
||
@JsonKey(name: 'courseId') | ||
int courseId; | ||
|
||
@JsonKey(name: 'desc') | ||
String desc; | ||
|
||
@JsonKey(name: 'descMd') | ||
String descMd; | ||
|
||
@JsonKey(name: 'envelopePic') | ||
String envelopePic; | ||
|
||
@JsonKey(name: 'fresh') | ||
bool fresh; | ||
|
||
@JsonKey(name: 'host') | ||
String host; | ||
|
||
@JsonKey(name: 'id') | ||
int id; | ||
|
||
@JsonKey(name: 'link') | ||
String link; | ||
|
||
@JsonKey(name: 'niceDate') | ||
String niceDate; | ||
|
||
@JsonKey(name: 'niceShareDate') | ||
String niceShareDate; | ||
|
||
@JsonKey(name: 'origin') | ||
String origin; | ||
|
||
@JsonKey(name: 'prefix') | ||
String prefix; | ||
|
||
@JsonKey(name: 'projectLink') | ||
String projectLink; | ||
|
||
@JsonKey(name: 'publishTime') | ||
int publishTime; | ||
|
||
@JsonKey(name: 'realSuperChapterId') | ||
int realSuperChapterId; | ||
|
||
@JsonKey(name: 'selfVisible') | ||
int selfVisible; | ||
|
||
@JsonKey(name: 'shareUser') | ||
String shareUser; | ||
|
||
@JsonKey(name: 'superChapterId') | ||
int superChapterId; | ||
|
||
@JsonKey(name: 'superChapterName') | ||
String superChapterName; | ||
|
||
@JsonKey(name: 'tags') | ||
List<dynamic> tags; | ||
|
||
@JsonKey(name: 'title') | ||
String title; | ||
|
||
@JsonKey(name: 'type') | ||
int type; | ||
|
||
@JsonKey(name: 'userId') | ||
int userId; | ||
|
||
@JsonKey(name: 'visible') | ||
int visible; | ||
|
||
@JsonKey(name: 'zan') | ||
int zan; | ||
|
||
Articles(this.apkLink,this.audit,this.author,this.canEdit,this.chapterId,this.chapterName,this.collect,this.courseId,this.desc,this.descMd,this.envelopePic,this.fresh,this.host,this.id,this.link,this.niceDate,this.niceShareDate,this.origin,this.prefix,this.projectLink,this.publishTime,this.realSuperChapterId,this.selfVisible,this.shareUser,this.superChapterId,this.superChapterName,this.tags,this.title,this.type,this.userId,this.visible,this.zan,); | ||
|
||
factory Articles.fromJson(Map<String, dynamic> srcJson) => _$ArticlesFromJson(srcJson); | ||
|
||
Map<String, dynamic> toJson() => _$ArticlesToJson(this); | ||
|
||
Map<String, dynamic> toJson() => _$NavigatorDataToJson(this); | ||
} | ||
|
||
|
||
// @JsonSerializable() | ||
// class Article extends Object { | ||
// @JsonKey(name: 'apkLink') | ||
// String? apkLink; | ||
// | ||
// @JsonKey(name: 'audit') | ||
// int? audit; | ||
// | ||
// @JsonKey(name: 'author') | ||
// String? author; | ||
// | ||
// @JsonKey(name: 'canEdit') | ||
// bool? canEdit; | ||
// | ||
// @JsonKey(name: 'chapterId') | ||
// int? chapterId; | ||
// | ||
// @JsonKey(name: 'chapterName') | ||
// String? chapterName; | ||
// | ||
// @JsonKey(name: 'collect') | ||
// bool? collect; | ||
// | ||
// @JsonKey(name: 'courseId') | ||
// int? courseId; | ||
// | ||
// @JsonKey(name: 'desc') | ||
// String? desc; | ||
// | ||
// @JsonKey(name: 'descMd') | ||
// String? descMd; | ||
// | ||
// @JsonKey(name: 'envelopePic') | ||
// String? envelopePic; | ||
// | ||
// @JsonKey(name: 'fresh') | ||
// bool? fresh; | ||
// | ||
// @JsonKey(name: 'host') | ||
// String? host; | ||
// | ||
// @JsonKey(name: 'id') | ||
// int? id; | ||
// | ||
// @JsonKey(name: 'link') | ||
// String? link; | ||
// | ||
// @JsonKey(name: 'niceDate') | ||
// String? niceDate; | ||
// | ||
// @JsonKey(name: 'niceShareDate') | ||
// String? niceShareDate; | ||
// | ||
// @JsonKey(name: 'origin') | ||
// String? origin; | ||
// | ||
// @JsonKey(name: 'prefix') | ||
// String? prefix; | ||
// | ||
// @JsonKey(name: 'projectLink') | ||
// String? projectLink; | ||
// | ||
// @JsonKey(name: 'publishTime') | ||
// int? publishTime; | ||
// | ||
// @JsonKey(name: 'realSuperChapterId') | ||
// int? realSuperChapterId; | ||
// | ||
// @JsonKey(name: 'selfVisible') | ||
// int? selfVisible; | ||
// | ||
// @JsonKey(name: 'shareUser') | ||
// String? shareUser; | ||
// | ||
// @JsonKey(name: 'superChapterId') | ||
// int? superChapterId; | ||
// | ||
// @JsonKey(name: 'superChapterName') | ||
// String? superChapterName; | ||
// | ||
// @JsonKey(name: 'tags') | ||
// List<dynamic>? tags; | ||
// | ||
// @JsonKey(name: 'title') | ||
// String? title; | ||
// | ||
// @JsonKey(name: 'type') | ||
// int? type; | ||
// | ||
// @JsonKey(name: 'userId') | ||
// int? userId; | ||
// | ||
// @JsonKey(name: 'visible') | ||
// int? visible; | ||
// | ||
// @JsonKey(name: 'zan') | ||
// int? zan; | ||
// | ||
// Article({ | ||
// this.apkLink, | ||
// this.audit, | ||
// this.author, | ||
// this.canEdit, | ||
// this.chapterId, | ||
// this.chapterName, | ||
// this.collect, | ||
// this.courseId, | ||
// this.desc, | ||
// this.descMd, | ||
// this.envelopePic, | ||
// this.fresh, | ||
// this.host, | ||
// this.id, | ||
// this.link, | ||
// this.niceDate, | ||
// this.niceShareDate, | ||
// this.origin, | ||
// this.prefix, | ||
// this.projectLink, | ||
// this.publishTime, | ||
// this.realSuperChapterId, | ||
// this.selfVisible, | ||
// this.shareUser, | ||
// this.superChapterId, | ||
// this.superChapterName, | ||
// this.tags, | ||
// this.title, | ||
// this.type, | ||
// this.userId, | ||
// this.visible, | ||
// this.zan, | ||
// }); | ||
// | ||
// factory Article.fromJson(Map<String, dynamic> srcJson) => | ||
// _$ArticleFromJson(srcJson); | ||
// | ||
// Map<String, dynamic> toJson() => _$ArticleToJson(this); | ||
// } |
Oops, something went wrong.