Commit d18aa2b8 authored by 杜欣's avatar 杜欣

Merge branch 'test' into featrue/duxin

parents aceea30b d94ecc47
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
* @author lsy * @author lsy
* @date 2020/6/24 * @date 2020/6/24
**/ **/
import 'package:flutter/cupertino.dart';
import 'package:flutter_common/Annotations/RouterBaser.dart'; import 'package:flutter_common/Annotations/RouterBaser.dart';
import 'package:flutter_common/Annotations/anno/Router.dart'; import 'package:flutter_common/Annotations/anno/Router.dart';
import 'package:flutter_common/Annotations/anno/RouterCenter.dart'; import 'package:flutter_common/Annotations/anno/RouterCenter.dart';
...@@ -10,4 +11,5 @@ import 'package:gm_flutter/ClueModel/ClueRouterImpl.dart'; ...@@ -10,4 +11,5 @@ import 'package:gm_flutter/ClueModel/ClueRouterImpl.dart';
@Router("ClueRouter",ClueRouterImpl,true) @Router("ClueRouter",ClueRouterImpl,true)
abstract class ClueRouter implements RouterBaser{ abstract class ClueRouter implements RouterBaser{
Widget getLevelOnePage();
} }
\ No newline at end of file
...@@ -2,8 +2,13 @@ ...@@ -2,8 +2,13 @@
* @author lsy * @author lsy
* @date 2020/6/24 * @date 2020/6/24
**/ **/
import 'package:flutter/src/widgets/framework.dart';
import 'package:gm_flutter/ClueModel/ClueRouter.dart'; import 'package:gm_flutter/ClueModel/ClueRouter.dart';
import 'package:gm_flutter/ClueModel/page/levelOne/LevelOnePage.dart';
class ClueRouterImpl implements ClueRouter{ class ClueRouterImpl implements ClueRouter {
@override
} Widget getLevelOnePage() {
\ No newline at end of file return LevelOnePage();
}
}
/*
* @author lsy
* @date 2020/6/29
**/
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:gm_flutter/ClueModel/server/entity/LevelOneFeedList.dart';
import 'package:gm_flutter/commonModel/base/BaseComponent.dart';
import 'package:gm_flutter/commonModel/base/BaseUtil.dart';
class LevelOneItem extends StatelessWidget {
final Cards cards;
VoidCallback lowPrice;
VoidCallback ask;
LevelOneItem(this.cards, {this.lowPrice, this.ask});
@override
Widget build(BuildContext context) {
if (cards.cardType == "plan") {
return PlanItem(context);
} else if (cards.cardType == "hospital") {
return HospitalItem(context);
}
}
Widget DoctorItem(BuildContext context) {
if (cards.doctor == null && isDebug) {
throw new Exception();
}
return GestureDetector(
child: Container(
margin: EdgeInsets.only(left: 15, right: 15),
height: 127,
child: Stack(
children: <Widget>[
Positioned(
top: 15,
child: Container(
width: 45,
height: 45,
child: ClipOval(
child: CachedNetworkImage(
imageUrl: cards.doctor.portrait,
),
),
),
),
Positioned(
left: 57,
top: 18,
child: Row(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.end,
children: <Widget>[
baseText(cards.doctor.name, 15, Color(0xff333333),
bold: true),
Container(
margin: EdgeInsets.only(left: 4),
child: baseText(cards.doctor.name, 15, Color(0xff333333),
bold: true),
)
],
),
),
Positioned(
top: 42,
right: 0,
child: Row(
crossAxisAlignment: CrossAxisAlignment.end,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
baseText("¥", 12, Color(0xffFF5963)),
baseText("${cards.doctor.minPrice}-${cards.doctor.maxPrice}",
15, Color(0xffFF5963)),
],
),
),
Positioned(
bottom: 15,
right: 0,
child: lowPriceWidget(),
),
Positioned(
bottom: 15,
right: 187,
child: askWidget(),
),
Positioned(
left: 4.5,
bottom: 25,
child: compareWidget(),
),
],
),
),
);
}
Widget HospitalItem(BuildContext context) {
if (cards.hospital == null && isDebug) {
throw new Exception();
}
return GestureDetector(
onTap: () {},
child: Container(
margin: EdgeInsets.only(left: 15, right: 15),
height: 149,
child: Stack(
children: <Widget>[
Positioned(
left: 0,
top: 15,
child: Container(
width: 45,
height: 45,
child: ClipOval(
child: CachedNetworkImage(
imageUrl: cards.hospital.portrait,
),
),
),
),
Positioned(
left: 57,
top: 17.5,
child: baseText(cards.hospital.name, 15, Color(0xff333333),
bold: true),
),
Positioned(
top: 42.5,
right: 0,
child: Row(
crossAxisAlignment: CrossAxisAlignment.end,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
baseText("¥", 12, Color(0xffFF5963)),
baseText(
"${cards.hospital.minPrice}-${cards.hospital.maxPrice}",
15,
Color(0xffFF5963)),
],
),
),
Positioned(
bottom: 15,
right: 0,
child: lowPriceWidget(),
),
Positioned(
bottom: 15,
right: 187,
child: askWidget(),
),
Positioned(
left: 4.5,
bottom: 25,
child: compareWidget(),
),
Positioned(
bottom: 67,
left: 57,
child: baseText(cards.hospital.name, 12, Color(0xff666666)),
)
],
),
));
}
Widget PlanItem(BuildContext context) {
if (cards.plan == null && isDebug) {
throw new Exception();
}
return Container(
height: 118,
margin: EdgeInsets.only(left: 15, right: 15),
child: Stack(
children: <Widget>[
Positioned(
left: 0,
top: 15,
child: baseText(cards.plan.planName, 15, Color(0xff282828),
bold: true),
),
Positioned(
right: 0,
top: 15,
child: Row(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.end,
children: <Widget>[
baseText("¥", 12, Color(0xffFF5963)),
baseText(cards.plan, 15, Color(0xffFF5963))
],
),
),
Positioned(
left: 4.5,
bottom: 25,
child: compareWidget(),
),
Positioned(bottom: 15, right: 0, child: lowPriceWidget()),
Positioned(
right: 152,
bottom: 15,
child: askWidget(),
),
Positioned(
top: 40,
right: 0,
child: baseText(
"指导价:¥${cards.plan.minPrice}-${cards.plan.maxPrice}",
11,
Color(0xff666666)),
),
Positioned(
left: 15,
bottom: 0,
child: Container(
width: MediaQuery.of(context).size.width - 30,
height: 0.5,
color: Color(0xffE5E5E5),
),
)
],
),
);
}
Widget lowPriceWidget() {
return GestureDetector(
onTap: lowPrice,
behavior: HitTestBehavior.opaque,
child: Container(
width: 122,
height: 37,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(18.5),
color: Color(0xffFFF5F5)),
alignment: Alignment.center,
child: baseText("获取底价", 14, Color(0xffFF5963), bold: true),
),
);
}
Widget askWidget() {
return GestureDetector(
onTap: ask,
behavior: HitTestBehavior.opaque,
child: Container(
width: 122,
height: 37,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(18.5),
color: Color(0xffEEFDFD)),
alignment: Alignment.center,
child: baseText("咨询", 14, Color(0xff3FB5AF), bold: true),
),
);
}
Widget compareWidget() {
return Row(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Container(
width: 18,
height: 18,
child: Image.asset("assets/vs.png"),
),
Container(
margin: EdgeInsets.only(left: 1.5),
child: baseText("去比较", 13, Color(0xff282828), bold: true),
)
],
);
}
}
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
* @date 2020/6/29 * @date 2020/6/29
**/ **/
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:gm_flutter/ClueModel/view/FiveStarView.dart';
import 'package:gm_flutter/commonModel/base/BaseState.dart'; import 'package:gm_flutter/commonModel/base/BaseState.dart';
class LevelOnePage extends StatefulWidget { class LevelOnePage extends StatefulWidget {
...@@ -13,5 +15,12 @@ class LevelOnePage extends StatefulWidget { ...@@ -13,5 +15,12 @@ class LevelOnePage extends StatefulWidget {
class LevelOneState extends BaseState<LevelOnePage> { class LevelOneState extends BaseState<LevelOnePage> {
@override @override
Widget buildItem(BuildContext context) { Widget buildItem(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
body: Stack(
children: <Widget>[ FiveStarView(3, 5),
],
),
);
} }
} }
...@@ -7,4 +7,6 @@ import 'package:flutter_common/Annotations/anno/ServiceCenter.dart'; ...@@ -7,4 +7,6 @@ import 'package:flutter_common/Annotations/anno/ServiceCenter.dart';
@ServiceCenter() @ServiceCenter()
class ClueApi { class ClueApi {
} }
\ No newline at end of file
/*
* @author lsy
* @date 2020/6/29
**/
class LevelOneFeedList {
List<Cards> cards;
LevelOneFeedList({this.cards});
LevelOneFeedList.fromJson(Map<String, dynamic> json) {
if (json['cards'] != null) {
cards = new List<Cards>();
json['cards'].forEach((v) { cards.add(new Cards.fromJson(v)); });
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
if (this.cards != null) {
data['cards'] = this.cards.map((v) => v.toJson()).toList();
}
return data;
}
}
class Cards {
String cardType;
Plan plan;
Hospital hospital;
Hospital doctor;
Diary diary;
Cards({this.cardType, this.plan, this.hospital, this.doctor, this.diary});
Cards.fromJson(Map<String, dynamic> json) {
cardType = json['card_type'];
plan = json['plan'] != null ? new Plan.fromJson(json['plan']) : null;
hospital = json['hospital'] != null ? new Hospital.fromJson(json['hospital']) : null;
doctor = json['doctor'] != null ? new Hospital.fromJson(json['doctor']) : null;
diary = json['diary'] != null ? new Diary.fromJson(json['diary']) : null;
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['card_type'] = this.cardType;
if (this.plan != null) {
data['plan'] = this.plan.toJson();
}
if (this.hospital != null) {
data['hospital'] = this.hospital.toJson();
}
if (this.doctor != null) {
data['doctor'] = this.doctor.toJson();
}
if (this.diary != null) {
data['diary'] = this.diary.toJson();
}
return data;
}
}
class Plan {
String planName;
String minPrice;
String maxPrice;
String positiveRate;
String salesCount;
List<BaseAttrs> baseAttrs;
String projectImage;
String consultUrl;
String phoneAuthroize;
Plan({this.planName, this.minPrice, this.maxPrice, this.positiveRate, this.salesCount, this.baseAttrs, this.projectImage, this.consultUrl, this.phoneAuthroize});
Plan.fromJson(Map<String, dynamic> json) {
planName = json['plan_name'];
minPrice = json['min_price'];
maxPrice = json['max_price'];
positiveRate = json['positive_rate'];
salesCount = json['sales_count'];
if (json['base_attrs'] != null) {
baseAttrs = new List<BaseAttrs>();
json['base_attrs'].forEach((v) { baseAttrs.add(new BaseAttrs.fromJson(v)); });
}
projectImage = json['project_image'];
consultUrl = json['consult_url'];
phoneAuthroize = json['phone_authroize'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['plan_name'] = this.planName;
data['min_price'] = this.minPrice;
data['max_price'] = this.maxPrice;
data['positive_rate'] = this.positiveRate;
data['sales_count'] = this.salesCount;
if (this.baseAttrs != null) {
data['base_attrs'] = this.baseAttrs.map((v) => v.toJson()).toList();
}
data['project_image'] = this.projectImage;
data['consult_url'] = this.consultUrl;
data['phone_authroize'] = this.phoneAuthroize;
return data;
}
}
class BaseAttrs {
String attrName;
String attrValue;
BaseAttrs({this.attrName, this.attrValue});
BaseAttrs.fromJson(Map<String, dynamic> json) {
attrName = json['attr_name'];
attrValue = json['attr_value'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['attr_name'] = this.attrName;
data['attr_value'] = this.attrValue;
return data;
}
}
class Hospital {
String portrait;
String name;
String minPrice;
String maxPrice;
List<BaseAttrs> baseAttrs;
String consultUrl;
String phoneAuthroize;
Hospital({this.portrait, this.name, this.minPrice, this.maxPrice, this.baseAttrs, this.consultUrl, this.phoneAuthroize});
Hospital.fromJson(Map<String, dynamic> json) {
portrait = json['portrait'];
name = json['name'];
minPrice = json['min_price'];
maxPrice = json['max_price'];
if (json['base_attrs'] != null) {
baseAttrs = new List<BaseAttrs>();
json['base_attrs'].forEach((v) { baseAttrs.add(new BaseAttrs.fromJson(v)); });
}
consultUrl = json['consult_url'];
phoneAuthroize = json['phone_authroize'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['portrait'] = this.portrait;
data['name'] = this.name;
data['min_price'] = this.minPrice;
data['max_price'] = this.maxPrice;
if (this.baseAttrs != null) {
data['base_attrs'] = this.baseAttrs.map((v) => v.toJson()).toList();
}
data['consult_url'] = this.consultUrl;
data['phone_authroize'] = this.phoneAuthroize;
return data;
}
}
class Diary {
int diaryNum;
String videoUrl;
bool isIdentification;
bool isLiked;
String titleStyleType;
int replyNum;
int lasestTopicCreatedTime;
List<Images> images;
RelationServiceSku relationServiceSku;
String createdTime;
int latestTopicId;
int id;
String city;
int userId;
String title;
bool isVoted;
int diaryId;
List<String> preImageList;
int voteNum;
List<TagsNewEra> tagsNewEra;
String content;
String videoPic;
String shortVideoUrl;
int diaryAmount;
String diaryTitle;
String authorType;
List<Tags> tags;
String contentLevel;
int lastModified;
User user;
bool isOnline;
String date;
String membershipLevel;
String viewNum;
List<String> postImageList;
UserLevel userLevel;
int serviceId;
Diary({this.diaryNum, this.videoUrl, this.isIdentification, this.isLiked, this.titleStyleType, this.replyNum, this.lasestTopicCreatedTime, this.images, this.relationServiceSku, this.createdTime, this.latestTopicId, this.id, this.city, this.userId, this.title, this.isVoted, this.diaryId, this.preImageList, this.voteNum, this.tagsNewEra, this.content, this.videoPic, this.shortVideoUrl, this.diaryAmount, this.diaryTitle, this.authorType, this.tags, this.contentLevel, this.lastModified, this.user, this.isOnline, this.date, this.membershipLevel, this.viewNum, this.postImageList, this.userLevel, this.serviceId});
Diary.fromJson(Map<String, dynamic> json) {
diaryNum = json['diary_num'];
videoUrl = json['video_url'];
isIdentification = json['is_identification'];
isLiked = json['is_liked'];
titleStyleType = json['title_style_type'];
replyNum = json['reply_num'];
lasestTopicCreatedTime = json['lasest_topic_created_time'];
if (json['images'] != null) {
images = new List<Images>();
json['images'].forEach((v) { images.add(new Images.fromJson(v)); });
}
relationServiceSku = json['relation_service_sku'] != null ? new RelationServiceSku.fromJson(json['relation_service_sku']) : null;
createdTime = json['created_time'];
latestTopicId = json['latest_topic_id'];
id = json['id'];
city = json['city'];
userId = json['user_id'];
title = json['title'];
isVoted = json['is_voted'];
diaryId = json['diary_id'];
preImageList = json['pre_image_list'].cast<String>();
voteNum = json['vote_num'];
if (json['tags_new_era'] != null) {
tagsNewEra = new List<TagsNewEra>();
json['tags_new_era'].forEach((v) { tagsNewEra.add(new TagsNewEra.fromJson(v)); });
}
content = json['content'];
videoPic = json['video_pic'];
shortVideoUrl = json['short_video_url'];
diaryAmount = json['diary_amount'];
diaryTitle = json['diary_title'];
authorType = json['author_type'];
if (json['tags'] != null) {
tags = new List<Tags>();
json['tags'].forEach((v) { tags.add(new Tags.fromJson(v)); });
}
contentLevel = json['content_level'];
lastModified = json['last_modified'];
user = json['user'] != null ? new User.fromJson(json['user']) : null;
isOnline = json['is_online'];
date = json['date'];
membershipLevel = json['membership_level'];
viewNum = json['view_num'];
postImageList = json['post_image_list'].cast<String>();
userLevel = json['user_level'] != null ? new UserLevel.fromJson(json['user_level']) : null;
serviceId = json['service_id'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['diary_num'] = this.diaryNum;
data['video_url'] = this.videoUrl;
data['is_identification'] = this.isIdentification;
data['is_liked'] = this.isLiked;
data['title_style_type'] = this.titleStyleType;
data['reply_num'] = this.replyNum;
data['lasest_topic_created_time'] = this.lasestTopicCreatedTime;
if (this.images != null) {
data['images'] = this.images.map((v) => v.toJson()).toList();
}
if (this.relationServiceSku != null) {
data['relation_service_sku'] = this.relationServiceSku.toJson();
}
data['created_time'] = this.createdTime;
data['latest_topic_id'] = this.latestTopicId;
data['id'] = this.id;
data['city'] = this.city;
data['user_id'] = this.userId;
data['title'] = this.title;
data['is_voted'] = this.isVoted;
data['diary_id'] = this.diaryId;
data['pre_image_list'] = this.preImageList;
data['vote_num'] = this.voteNum;
if (this.tagsNewEra != null) {
data['tags_new_era'] = this.tagsNewEra.map((v) => v.toJson()).toList();
}
data['content'] = this.content;
data['video_pic'] = this.videoPic;
data['short_video_url'] = this.shortVideoUrl;
data['diary_amount'] = this.diaryAmount;
data['diary_title'] = this.diaryTitle;
data['author_type'] = this.authorType;
if (this.tags != null) {
data['tags'] = this.tags.map((v) => v.toJson()).toList();
}
data['content_level'] = this.contentLevel;
data['last_modified'] = this.lastModified;
if (this.user != null) {
data['user'] = this.user.toJson();
}
data['is_online'] = this.isOnline;
data['date'] = this.date;
data['membership_level'] = this.membershipLevel;
data['view_num'] = this.viewNum;
data['post_image_list'] = this.postImageList;
if (this.userLevel != null) {
data['user_level'] = this.userLevel.toJson();
}
data['service_id'] = this.serviceId;
return data;
}
}
class Images {
String imageWide;
int imageType;
String image;
String sImagePlatform;
String imageSlimwidth;
String smallWide;
String imageThumb;
String imageHalf;
String desc;
Images({this.imageWide, this.imageType, this.image, this.sImagePlatform, this.imageSlimwidth, this.smallWide, this.imageThumb, this.imageHalf, this.desc});
Images.fromJson(Map<String, dynamic> json) {
imageWide = json['image_wide'];
imageType = json['image_type'];
image = json['image'];
sImagePlatform = json['_image_platform'];
imageSlimwidth = json['image_slimwidth'];
smallWide = json['small_wide'];
imageThumb = json['image_thumb'];
imageHalf = json['image_half'];
desc = json['desc'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['image_wide'] = this.imageWide;
data['image_type'] = this.imageType;
data['image'] = this.image;
data['_image_platform'] = this.sImagePlatform;
data['image_slimwidth'] = this.imageSlimwidth;
data['small_wide'] = this.smallWide;
data['image_thumb'] = this.imageThumb;
data['image_half'] = this.imageHalf;
data['desc'] = this.desc;
return data;
}
}
class RelationServiceSku {
RelationServiceSku();
RelationServiceSku.fromJson(Map<String, dynamic> json) {
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
return data;
}
}
class TagsNewEra {
String type;
String name;
int tagId;
int id;
TagsNewEra({this.type, this.name, this.tagId, this.id});
TagsNewEra.fromJson(Map<String, dynamic> json) {
type = json['type'];
name = json['name'];
tagId = json['tag_id'];
id = json['id'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['type'] = this.type;
data['name'] = this.name;
data['tag_id'] = this.tagId;
data['id'] = this.id;
return data;
}
}
class User {
Null city;
int userId;
int topicNumPosted;
int voteNumGained;
String portrait;
String userName;
String membershipLevel;
User({this.city, this.userId, this.topicNumPosted, this.voteNumGained, this.portrait, this.userName, this.membershipLevel});
User.fromJson(Map<String, dynamic> json) {
city = json['city'];
userId = json['user_id'];
topicNumPosted = json['topic_num_posted'];
voteNumGained = json['vote_num_gained'];
portrait = json['portrait'];
userName = json['user_name'];
membershipLevel = json['membership_level'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['city'] = this.city;
data['user_id'] = this.userId;
data['topic_num_posted'] = this.topicNumPosted;
data['vote_num_gained'] = this.voteNumGained;
data['portrait'] = this.portrait;
data['user_name'] = this.userName;
data['membership_level'] = this.membershipLevel;
return data;
}
}
class UserLevel {
String levelIcon;
String constellationIcon;
String membershipIcon;
UserLevel({this.levelIcon, this.constellationIcon, this.membershipIcon});
UserLevel.fromJson(Map<String, dynamic> json) {
levelIcon = json['level_icon'];
constellationIcon = json['constellation_icon'];
membershipIcon = json['membership_icon'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['level_icon'] = this.levelIcon;
data['constellation_icon'] = this.constellationIcon;
data['membership_icon'] = this.membershipIcon;
return data;
}
}
class Tags {
String type;
String name;
int tagId;
int id;
Tags({this.type, this.name, this.tagId, this.id});
Tags.fromJson(Map<String, dynamic> json) {
type = json['type'];
name = json['name'];
tagId = json['tag_id'];
id = json['id'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['type'] = this.type;
data['name'] = this.name;
data['tag_id'] = this.tagId;
data['id'] = this.id;
return data;
}
}
/*
* @author lsy
* @date 2020/6/29
**/
import 'package:flutter/cupertino.dart';
class FiveStarView extends StatelessWidget {
final int allStarCount;
final int lightStarCount;
FiveStarView(this.lightStarCount, this.allStarCount);
@override
Widget build(BuildContext context) {
List<Widget> list = new List();
for (int i = 0; i < allStarCount; i++) {
if (i <= lightStarCount) {
list.add(Container(
height: 13,
width: 13,
child: Image.asset("assets/sel_star.png"),
));
if (i != 0 && i != allStarCount - 1) {
list.add(Container(
height: 1,
width: 2,
));
}
} else {
list.add(Container(
height: 13,
width: 13,
child: Image.asset("assets/normal_star.png"),
));
if (i != 0 && i != allStarCount - 1) {
list.add(Container(
height: 1,
width: 2,
));
}
}
}
return Row(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.center,
children: list,
);
}
}
...@@ -58,7 +58,8 @@ class MyApp extends State<MyAppWidget> { ...@@ -58,7 +58,8 @@ class MyApp extends State<MyAppWidget> {
return DemoPage1(); return DemoPage1();
}, },
}); });
FlutterBoost.singleton.addBoostContainerLifeCycleObserver((state, settings) { FlutterBoost.singleton.addBoostContainerLifeCycleObserver((state,
settings) {
print("LSY ${state}"); print("LSY ${state}");
}); });
// FlutterBoost.singleton.addBoostNavigatorObserver(TestBoostNavigatorObserver()); // FlutterBoost.singleton.addBoostNavigatorObserver(TestBoostNavigatorObserver());
...@@ -68,26 +69,14 @@ class MyApp extends State<MyAppWidget> { ...@@ -68,26 +69,14 @@ class MyApp extends State<MyAppWidget> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
WindowUtil.setBarStatus(true); WindowUtil.setBarStatus(true);
return MaterialApp( return MaterialApp(
theme: ThemeData(), theme: ThemeData(),
builder: FlutterBoost.init(postPush: _onRoutePushed), builder: FlutterBoost.init(postPush: _onRoutePushed),
home: isDebug home: RouterCenterImpl().findClueRouter().getLevelOnePage());
? Container(
color: Colors.red,
)
: Container(
color: Colors.white,
child: Center(
child: loadingItem(),
),
)
);
} }
void _onRoutePushed( void _onRoutePushed(String pageName,
String pageName, String uniqueId,
String uniqueId, Map<String, dynamic> params,
Map<String, dynamic> params, Route<dynamic> route,
Route<dynamic> route, Future<dynamic> _,) {}
Future<dynamic> _,
) {}
} }
...@@ -32,6 +32,7 @@ dependencies: ...@@ -32,6 +32,7 @@ dependencies:
#轻量级存储 #轻量级存储
shared_preferences: ^0.5.7+1 shared_preferences: ^0.5.7+1
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:
sdk: flutter sdk: flutter
...@@ -40,7 +41,8 @@ dev_dependencies: ...@@ -40,7 +41,8 @@ dev_dependencies:
flutter: flutter:
uses-material-design: true uses-material-design: true
assets:
- assets/
module: module:
androidX: true androidX: true
androidPackage: com.example.gm_flutter androidPackage: com.example.gm_flutter
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment