Commit 376e160a authored by 林生雨's avatar 林生雨

w

parent 0e864ab7
...@@ -22,6 +22,7 @@ class LevelOneItem extends StatelessWidget { ...@@ -22,6 +22,7 @@ class LevelOneItem extends StatelessWidget {
Function(int planId) gotoPlan; Function(int planId) gotoPlan;
int position; int position;
String tabName; String tabName;
int allSize;
LevelOneItem(this.cards, LevelOneItem(this.cards,
{this.lowPrice, {this.lowPrice,
...@@ -29,7 +30,8 @@ class LevelOneItem extends StatelessWidget { ...@@ -29,7 +30,8 @@ class LevelOneItem extends StatelessWidget {
this.compare, this.compare,
this.gotoPlan, this.gotoPlan,
this.position, this.position,
this.tabName}); this.tabName,
this.allSize});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
...@@ -100,11 +102,6 @@ class LevelOneItem extends StatelessWidget { ...@@ -100,11 +102,6 @@ class LevelOneItem extends StatelessWidget {
), ),
), ),
), ),
Positioned(
left: 57,
top: 48,
child: FiveStarView(int.parse(cards.doctor.star), 5),
),
Positioned( Positioned(
left: 57, left: 57,
top: 17, top: 17,
...@@ -124,8 +121,16 @@ class LevelOneItem extends StatelessWidget { ...@@ -124,8 +121,16 @@ class LevelOneItem extends StatelessWidget {
), ),
Positioned( Positioned(
top: 42, top: 42,
right: 0, left: 57,
child: Container(
width: MediaQuery.of(context).size.width - 30 - 57,
child: Row( child: Row(
children: <Widget>[
FiveStarView(int.parse(cards.doctor.star), 5),
Expanded(
child: Container(),
),
Row(
crossAxisAlignment: CrossAxisAlignment.baseline, crossAxisAlignment: CrossAxisAlignment.baseline,
textBaseline: TextBaseline.alphabetic, textBaseline: TextBaseline.alphabetic,
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
...@@ -136,12 +141,18 @@ class LevelOneItem extends StatelessWidget { ...@@ -136,12 +141,18 @@ class LevelOneItem extends StatelessWidget {
height: 0, height: 0,
) )
: baseText("¥", 12, Color(0xffFF5963)), : baseText("¥", 12, Color(0xffFF5963)),
baseText(price, price == "暂无报价" ? 13 : 15, baseText(
price == "暂无报价" ? Color(0xff999999) : Color(0xffFF5963), price,
price == "暂无报价" ? 13 : 15,
price == "暂无报价"
? Color(0xff999999)
: Color(0xffFF5963),
bold: price != "暂无报价") bold: price != "暂无报价")
], ],
), ),
],
), ),
)),
Positioned( Positioned(
left: 57, left: 57,
bottom: 15, bottom: 15,
...@@ -150,33 +161,18 @@ class LevelOneItem extends StatelessWidget { ...@@ -150,33 +161,18 @@ class LevelOneItem extends StatelessWidget {
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
child: askWidget(), child: askWidget(margin: true),
), ),
Container( Container(
width: 15, width: 15,
), ),
Expanded( Expanded(
child: lowPriceWidget(), child: lowPriceWidget(margin: true),
) )
], ],
), ),
), ),
), ),
// Positioned(
// bottom: 15,
// right: 0,
// child: lowPriceWidget(),
// ),
// Positioned(
// bottom: 15,
// right: 137,
// child: askWidget(),
// ),
// Positioned(
// left: 4.5,
// bottom: 25,
// child: compareWidget(),
// ),
Positioned( Positioned(
left: 0, left: 0,
bottom: 0, bottom: 0,
...@@ -241,8 +237,19 @@ class LevelOneItem extends StatelessWidget { ...@@ -241,8 +237,19 @@ class LevelOneItem extends StatelessWidget {
), ),
Positioned( Positioned(
top: 42.5, top: 42.5,
right: 0, left: 57,
child: Container(
width: MediaQuery.of(context).size.width - 30 - 57,
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
FiveStarView(int.parse(cards.hospital.star), 5),
Expanded(
child: Container(
height: 0,
),
),
Row(
crossAxisAlignment: CrossAxisAlignment.baseline, crossAxisAlignment: CrossAxisAlignment.baseline,
textBaseline: TextBaseline.alphabetic, textBaseline: TextBaseline.alphabetic,
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
...@@ -253,12 +260,17 @@ class LevelOneItem extends StatelessWidget { ...@@ -253,12 +260,17 @@ class LevelOneItem extends StatelessWidget {
height: 0, height: 0,
) )
: baseText("¥", 12, Color(0xffFF5963)), : baseText("¥", 12, Color(0xffFF5963)),
baseText(price, price == "暂无报价" ? 13 : 15, baseText(
price == "暂无报价" ? Color(0xff999999) : Color(0xffFF5963), price,
price == "暂无报价" ? 13 : 15,
price == "暂无报价"
? Color(0xff999999)
: Color(0xffFF5963),
bold: price != "暂无报价") bold: price != "暂无报价")
], ],
), ),
), ],
))),
Positioned( Positioned(
bottom: 15, bottom: 15,
left: 57, left: 57,
...@@ -267,33 +279,18 @@ class LevelOneItem extends StatelessWidget { ...@@ -267,33 +279,18 @@ class LevelOneItem extends StatelessWidget {
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
child: askWidget(), child: askWidget(margin: true),
), ),
Container( Container(
width: 15, width: 15,
), ),
Expanded( Expanded(
child: lowPriceWidget(), child: lowPriceWidget(margin: true),
) )
], ],
), ),
), ),
), ),
// Positioned(
// bottom: 15,
// right: 0,
// child: lowPriceWidget(),
// ),
// Positioned(
// bottom: 15,
// right: 137,
// child: askWidget(),
// ),
// Positioned(
// left: 4.5,
// bottom: 25,
// child: compareWidget(),
// ),
Positioned( Positioned(
bottom: 63.5, bottom: 63.5,
left: 57, left: 57,
...@@ -303,11 +300,11 @@ class LevelOneItem extends StatelessWidget { ...@@ -303,11 +300,11 @@ class LevelOneItem extends StatelessWidget {
baseText(cards.hospital.address, 12, Color(0xff666666)), baseText(cards.hospital.address, 12, Color(0xff666666)),
), ),
), ),
Positioned( // Positioned(
left: 57, // left: 57,
top: 47, // top: 47,
child: FiveStarView(int.parse(cards.hospital.star), 5), // child: FiveStarView(int.parse(cards.hospital.star), 5),
), // ),
Positioned( Positioned(
left: 0, left: 0,
bottom: 0, bottom: 0,
...@@ -328,28 +325,33 @@ class LevelOneItem extends StatelessWidget { ...@@ -328,28 +325,33 @@ class LevelOneItem extends StatelessWidget {
} }
String price = String price =
NumPlanUtil.getPrice(cards.plan.minPrice, cards.plan.maxPrice); NumPlanUtil.getPrice(cards.plan.minPrice, cards.plan.maxPrice);
return Container( return Column(
height: 118, children: <Widget>[
Container(
height: 117.5,
margin: EdgeInsets.only(left: 15, right: 15), margin: EdgeInsets.only(left: 15, right: 15),
child: Stack( child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[ children: <Widget>[
Positioned( Container(
left: 0, height: 11,
top: 15,
child: Container(
width: 210,
child: baseText(cards.plan.planName, 15, Color(0xff282828),
bold: true),
),
), ),
Positioned( Row(
right: 0,
top: 15,
child: Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.baseline, crossAxisAlignment: CrossAxisAlignment.baseline,
textBaseline: TextBaseline.alphabetic, textBaseline: TextBaseline.alphabetic,
children: <Widget>[ children: <Widget>[
Container(
constraints: BoxConstraints(
maxWidth:
MediaQuery.of(context).size.width - 15 - 130),
child: baseText(
cards.plan.planName, 15, Color(0xff282828),
bold: true),
),
Expanded(
child: Container(),
),
price == "暂无报价" price == "暂无报价"
? Container( ? Container(
width: 0, width: 0,
...@@ -361,36 +363,29 @@ class LevelOneItem extends StatelessWidget { ...@@ -361,36 +363,29 @@ class LevelOneItem extends StatelessWidget {
bold: price != "暂无报价") bold: price != "暂无报价")
], ],
), ),
), Container(
Positioned( margin: EdgeInsets.only(top: 7),
left: 4.5, alignment: Alignment.centerRight,
bottom: 25,
child: compareWidget(),
),
Positioned(bottom: 15, right: 0, child: lowPriceWidget()),
Positioned(
right: 137,
bottom: 15,
child: askWidget(),
),
Positioned(
top: 40,
right: 0,
child: baseText("指导价:${cards.plan.guide_price ?? "暂无报价"}", 11, child: baseText("指导价:${cards.plan.guide_price ?? "暂无报价"}", 11,
Color(0xff666666)), Color(0xff666666)),
), ),
Positioned( Container(
left: 0, margin: EdgeInsets.only(top: 11),
bottom: 0, height: 37,
child: Container( child: Row(
width: MediaQuery.of(context).size.width - 30, children: <Widget>[
height: 0.5, compareWidget(),
color: Color(0xffE5E5E5), Expanded(
child: askWidget(),
), ),
Expanded(
child: lowPriceWidget(),
) )
], ],
), ),
).gestureDetector(() { )
],
)).gestureDetector(() {
buried_on_click_card( buried_on_click_card(
position, tabName, "level_two_plan", "${cards.plan.plan_id}"); position, tabName, "level_two_plan", "${cards.plan.plan_id}");
Map<String, dynamic> map = { Map<String, dynamic> map = {
...@@ -401,15 +396,26 @@ class LevelOneItem extends StatelessWidget { ...@@ -401,15 +396,26 @@ class LevelOneItem extends StatelessWidget {
RouterCenterImpl() RouterCenterImpl()
.findMainRouter() .findMainRouter()
.jumpPage(context, "level_two_plan_deatil", map, false); .jumpPage(context, "level_two_plan_deatil", map, false);
}); }),
allSize != null && position != null && position < allSize - 1
? Container(
width: MediaQuery.of(context).size.width - 30,
height: 0.5,
color: Color(0xffE5E5E5),
)
: Container(
height: 0.5,
),
],
);
} }
Widget lowPriceWidget() { Widget lowPriceWidget({bool margin = false}) {
return GestureDetector( return GestureDetector(
onTap: lowPrice, onTap: lowPrice,
behavior: HitTestBehavior.opaque, behavior: HitTestBehavior.opaque,
child: Container( child: Container(
width: 122, margin: EdgeInsets.only(left: margin ? 0.0 : 15),
height: 37, height: 37,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(18.5), borderRadius: BorderRadius.circular(18.5),
...@@ -420,12 +426,12 @@ class LevelOneItem extends StatelessWidget { ...@@ -420,12 +426,12 @@ class LevelOneItem extends StatelessWidget {
); );
} }
Widget askWidget() { Widget askWidget({bool margin = false}) {
return GestureDetector( return GestureDetector(
onTap: ask, onTap: ask,
behavior: HitTestBehavior.opaque, behavior: HitTestBehavior.opaque,
child: Container( child: Container(
width: 122, margin: EdgeInsets.only(left: margin ? 0 : 15),
height: 37, height: 37,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(18.5), borderRadius: BorderRadius.circular(18.5),
...@@ -437,7 +443,10 @@ class LevelOneItem extends StatelessWidget { ...@@ -437,7 +443,10 @@ class LevelOneItem extends StatelessWidget {
} }
Widget compareWidget() { Widget compareWidget() {
return Row( return Container(
height: 30,
width: 71,
child: Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[ children: <Widget>[
...@@ -453,7 +462,8 @@ class LevelOneItem extends StatelessWidget { ...@@ -453,7 +462,8 @@ class LevelOneItem extends StatelessWidget {
], ],
).gestureDetector(() { ).gestureDetector(() {
compare(cards.plan.plan_id); compare(cards.plan.plan_id);
}); }),
);
} }
Widget DiaryItem(BuildContext context) { Widget DiaryItem(BuildContext context) {
......
...@@ -101,8 +101,11 @@ class LevelOneListState extends State<LevelOneList> ...@@ -101,8 +101,11 @@ class LevelOneListState extends State<LevelOneList>
color: Color(0xffF7F6FA), color: Color(0xffF7F6FA),
); );
} }
return LevelOneItem( return Container(
color: Colors.white,
child: LevelOneItem(
_model.data[index], _model.data[index],
allSize: _model.data.length,
lowPrice: () { lowPrice: () {
if (CacheManager.getInstance() if (CacheManager.getInstance()
.get(MEMORY_CACHE) .get(MEMORY_CACHE)
...@@ -111,19 +114,18 @@ class LevelOneListState extends State<LevelOneList> ...@@ -111,19 +114,18 @@ class LevelOneListState extends State<LevelOneList>
RouterCenterImpl() RouterCenterImpl()
.findMainRouter() .findMainRouter()
.isWithNative()) { .isWithNative()) {
RouterCenterImpl() RouterCenterImpl().findMainRouter().jumpPage(
.findMainRouter() context, "show_login", null, true);
.jumpPage(context, "show_login", null, true);
return; return;
} }
var data2 = _model.data[index]; var data2 = _model.data[index];
if (data2.cardType == "doctor") { if (data2.cardType == "doctor") {
buried_on_click_button(index, "bargain", "doctor", buried_on_click_button(index, "bargain",
data2.doctor.doctor_id); "doctor", data2.doctor.doctor_id);
} else if (data2.cardType == "hospital") { } else if (data2.cardType == "hospital") {
buried_on_click_button(index, "bargain", "hospital", buried_on_click_button(index, "bargain",
data2.hospital.hosiptalId); "hospital", data2.hospital.hosiptalId);
} else if (data2.cardType == "plan") { } else if (data2.cardType == "plan") {
buried_on_click_button(index, "bargain", buried_on_click_button(index, "bargain",
"level_two_plan", "${data2.plan.plan_id}"); "level_two_plan", "${data2.plan.plan_id}");
...@@ -146,19 +148,25 @@ class LevelOneListState extends State<LevelOneList> ...@@ -146,19 +148,25 @@ class LevelOneListState extends State<LevelOneList>
NativeToast.showNativeToast("该机构未开通私信功能"); NativeToast.showNativeToast("该机构未开通私信功能");
return; return;
} }
buried_on_click_button(index, "consult", "doctor", buried_on_click_button(index, "consult",
data2.doctor.doctor_id); "doctor", data2.doctor.doctor_id);
RouterCenterImpl().findMainRouter().jumpPage( RouterCenterImpl().findMainRouter().jumpPage(
context, data2.doctor.messageUrl, null, true); context,
data2.doctor.messageUrl,
null,
true);
} else if (data2.cardType == "hospital") { } else if (data2.cardType == "hospital") {
if (!data2.hospital.accept_private_msg) { if (!data2.hospital.accept_private_msg) {
NativeToast.showNativeToast("该机构未开通私信功能"); NativeToast.showNativeToast("该机构未开通私信功能");
return; return;
} }
buried_on_click_button(index, "consult", "hospital", buried_on_click_button(index, "consult",
data2.hospital.hosiptalId); "hospital", data2.hospital.hosiptalId);
RouterCenterImpl().findMainRouter().jumpPage( RouterCenterImpl().findMainRouter().jumpPage(
context, data2.hospital.messageUrl, null, true); context,
data2.hospital.messageUrl,
null,
true);
} else if (data2.cardType == "plan") { } else if (data2.cardType == "plan") {
if (CacheManager.getInstance() if (CacheManager.getInstance()
.get(MEMORY_CACHE) .get(MEMORY_CACHE)
...@@ -167,9 +175,8 @@ class LevelOneListState extends State<LevelOneList> ...@@ -167,9 +175,8 @@ class LevelOneListState extends State<LevelOneList>
RouterCenterImpl() RouterCenterImpl()
.findMainRouter() .findMainRouter()
.isWithNative()) { .isWithNative()) {
RouterCenterImpl() RouterCenterImpl().findMainRouter().jumpPage(
.findMainRouter() context, "show_login", null, true);
.jumpPage(context, "show_login", null, true);
return; return;
} }
buried_on_click_button(index, "consult", buried_on_click_button(index, "consult",
...@@ -183,11 +190,11 @@ class LevelOneListState extends State<LevelOneList> ...@@ -183,11 +190,11 @@ class LevelOneListState extends State<LevelOneList>
compare: (int planId) { compare: (int planId) {
var data2 = _model.data[index]; var data2 = _model.data[index];
if (data2.cardType == "doctor") { if (data2.cardType == "doctor") {
buried_on_click_button(index, "compare", "doctor", buried_on_click_button(index, "compare",
data2.doctor.doctor_id); "doctor", data2.doctor.doctor_id);
} else if (data2.cardType == "hospital") { } else if (data2.cardType == "hospital") {
buried_on_click_button(index, "compare", "hospital", buried_on_click_button(index, "compare",
data2.hospital.hosiptalId); "hospital", data2.hospital.hosiptalId);
} else if (data2.cardType == "plan") { } else if (data2.cardType == "plan") {
buried_on_click_button(index, "compare", buried_on_click_button(index, "compare",
"level_two_plan", "${data2.plan.plan_id}"); "level_two_plan", "${data2.plan.plan_id}");
...@@ -209,7 +216,7 @@ class LevelOneListState extends State<LevelOneList> ...@@ -209,7 +216,7 @@ class LevelOneListState extends State<LevelOneList>
}, },
tabName: widget.tabName, tabName: widget.tabName,
position: index, position: index,
); ));
}, },
childCount: _model.data.length + 1, childCount: _model.data.length + 1,
), ),
......
...@@ -221,7 +221,8 @@ class LevelOneState extends BaseState<LevelOnePage> ...@@ -221,7 +221,8 @@ class LevelOneState extends BaseState<LevelOnePage>
SliverOverlapAbsorber( SliverOverlapAbsorber(
handle: extend.NestedScrollView.sliverOverlapAbsorberHandleFor( handle: extend.NestedScrollView.sliverOverlapAbsorberHandleFor(
context), context),
sliver: baseSliverAppBar(_model.imageUrl)), sliver: baseSliverAppBar(_model.imageUrl,
height: ScreenUtil().setHeight(200))),
SliverList( SliverList(
delegate: SliverChildBuilderDelegate((BuildContext c, int i) { delegate: SliverChildBuilderDelegate((BuildContext c, int i) {
if (i == 0) { if (i == 0) {
...@@ -246,15 +247,17 @@ class LevelOneState extends BaseState<LevelOnePage> ...@@ -246,15 +247,17 @@ class LevelOneState extends BaseState<LevelOnePage>
), ),
]; ];
}, },
body: TabBarView(controller: tabController, children: list)); body: Container(
color: Color(0xffF7F6FA),
child: TabBarView(controller: tabController, children: list)));
} }
List<Widget> getTabs() { List<Widget> getTabs() {
List<Widget> list = []; List<Widget> list = [];
for (int i = 0; i < _model.tabsList.length; i++) { for (int i = 0; i < _model.tabsList.length; i++) {
list.add(baseTabBarItem(_model.tabsList[i].name, list.add(baseTabBarItem(_model.tabsList[i].name,
leftPadding: i == 0 ? 24 : 28, leftPadding: i == 0 ? 21.5 : 14,
rightPadding: i == _model.tabsList.length - 1 ? 24 : 28)); rightPadding: i == _model.tabsList.length - 1 ? 21.5 : 14));
} }
return list; return list;
} }
...@@ -283,7 +286,7 @@ class LevelOneState extends BaseState<LevelOnePage> ...@@ -283,7 +286,7 @@ class LevelOneState extends BaseState<LevelOnePage>
return Container( return Container(
width: MediaQuery.of(context).size.width, width: MediaQuery.of(context).size.width,
height: 54, height: 54,
margin: EdgeInsets.only(top: 14, bottom: 12), margin: EdgeInsets.only(top: 19, bottom: 12),
child: Stack( child: Stack(
children: <Widget>[ children: <Widget>[
Positioned( Positioned(
...@@ -293,7 +296,7 @@ class LevelOneState extends BaseState<LevelOnePage> ...@@ -293,7 +296,7 @@ class LevelOneState extends BaseState<LevelOnePage>
bold: true), bold: true),
), ),
Positioned( Positioned(
bottom: 6, bottom: 3.5,
left: 15, left: 15,
child: Container( child: Container(
width: MediaQuery.of(context).size.width - 30 - 100, width: MediaQuery.of(context).size.width - 30 - 100,
...@@ -411,11 +414,9 @@ class LevelOneState extends BaseState<LevelOnePage> ...@@ -411,11 +414,9 @@ class LevelOneState extends BaseState<LevelOnePage>
Widget explain() { Widget explain() {
List<Widget> list = []; List<Widget> list = [];
list.add(Container( list.add(Row(
height: 31,
child: Row(
children: <Widget>[ children: <Widget>[
baseText("项目说明", 15, Color(0xff282828)), baseText("项目说明", 15, Color(0xff282828), bold: true),
Expanded( Expanded(
child: Container(), child: Container(),
), ),
...@@ -434,12 +435,14 @@ class LevelOneState extends BaseState<LevelOnePage> ...@@ -434,12 +435,14 @@ class LevelOneState extends BaseState<LevelOnePage>
child: baseText("了解更多", 12, Color(0xff3FB5AF)), child: baseText("了解更多", 12, Color(0xff3FB5AF)),
) )
], ],
), ));
list.add(Container(
height: 11,
)); ));
if (_model.planoverItem != null) { if (_model.planoverItem != null) {
_model.planoverItem.explanationAttrs.forEach((element) { _model.planoverItem.explanationAttrs.forEach((element) {
list.add(Container( list.add(Container(
margin: EdgeInsets.only(bottom: 15), margin: EdgeInsets.only(bottom: 10),
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
Container( Container(
...@@ -489,7 +492,7 @@ class LevelOneState extends BaseState<LevelOnePage> ...@@ -489,7 +492,7 @@ class LevelOneState extends BaseState<LevelOnePage>
}); });
} }
return Container( return Container(
margin: EdgeInsets.only(left: 15, right: 15, bottom: 20), margin: EdgeInsets.only(left: 15, right: 15, bottom: 9),
child: Column( child: Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: list, children: list,
......
...@@ -256,8 +256,8 @@ class LevelTwoState extends BaseState<LevelTwoPage> ...@@ -256,8 +256,8 @@ class LevelTwoState extends BaseState<LevelTwoPage>
List<Widget> list = []; List<Widget> list = [];
for (int i = 0; i < _model.tabsList.length; i++) { for (int i = 0; i < _model.tabsList.length; i++) {
list.add(baseTabBarItem(_model.tabsList[i].name, list.add(baseTabBarItem(_model.tabsList[i].name,
leftPadding: i == 0 ? 24 : 28, leftPadding: i == 0 ? 21.5 : 14,
rightPadding: i == _model.tabsList.length - 1 ? 24 : 28)); rightPadding: i == _model.tabsList.length - 1 ? 21.5 : 14));
} }
return list; return list;
} }
...@@ -372,7 +372,7 @@ class LevelTwoState extends BaseState<LevelTwoPage> ...@@ -372,7 +372,7 @@ class LevelTwoState extends BaseState<LevelTwoPage>
), ),
width: double.maxFinite, width: double.maxFinite,
height: 62, height: 62,
margin: EdgeInsets.only(left: 15, right: 15, bottom: 12), margin: EdgeInsets.only(left: 15, right: 15, bottom: 17),
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: list, children: list,
...@@ -382,12 +382,9 @@ class LevelTwoState extends BaseState<LevelTwoPage> ...@@ -382,12 +382,9 @@ class LevelTwoState extends BaseState<LevelTwoPage>
Widget explain() { Widget explain() {
List<Widget> list = []; List<Widget> list = [];
list.add(Container( list.add(Row(
margin: EdgeInsets.only(bottom: 4),
height: 31,
child: Row(
children: <Widget>[ children: <Widget>[
baseText("项目说明", 15, Color(0xff282828), bold: true), baseText("项目说明", 15, Color(0xff282828),bold: true),
Expanded( Expanded(
child: Container(), child: Container(),
), ),
...@@ -406,7 +403,9 @@ class LevelTwoState extends BaseState<LevelTwoPage> ...@@ -406,7 +403,9 @@ class LevelTwoState extends BaseState<LevelTwoPage>
child: baseText("了解更多", 12, Color(0xff3FB5AF)), child: baseText("了解更多", 12, Color(0xff3FB5AF)),
) )
], ],
), ));
list.add(Container(
height: 11,
)); ));
if (_model.planoverItem != null) { if (_model.planoverItem != null) {
_model.planoverItem.explanationAttrs.forEach((element) { _model.planoverItem.explanationAttrs.forEach((element) {
...@@ -456,7 +455,7 @@ class LevelTwoState extends BaseState<LevelTwoPage> ...@@ -456,7 +455,7 @@ class LevelTwoState extends BaseState<LevelTwoPage>
}); });
} }
return Container( return Container(
margin: EdgeInsets.only(left: 15, right: 15, bottom: 3), margin: EdgeInsets.only(left: 15, right: 15, bottom: 9),
child: Column( child: Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: list, children: list,
......
...@@ -139,7 +139,7 @@ class PlanItem extends StatelessWidget { ...@@ -139,7 +139,7 @@ class PlanItem extends StatelessWidget {
left: 91, left: 91,
bottom: 12, bottom: 12,
child: Container( child: Container(
width: MediaQuery.of(context).size.width - 30 - 91 - 10, width: MediaQuery.of(context).size.width - 30 - 91 - 4,
child: Row( child: Row(
textBaseline: TextBaseline.alphabetic, textBaseline: TextBaseline.alphabetic,
crossAxisAlignment: CrossAxisAlignment.baseline, crossAxisAlignment: CrossAxisAlignment.baseline,
......
...@@ -199,8 +199,8 @@ class TopPageState extends BaseState<TopPage> with TickerProviderStateMixin { ...@@ -199,8 +199,8 @@ class TopPageState extends BaseState<TopPage> with TickerProviderStateMixin {
List<Widget> list = []; List<Widget> list = [];
for (int i = 0; i < _model.tabs.length; i++) { for (int i = 0; i < _model.tabs.length; i++) {
list.add(baseTabBarItem(_model.tabs[i].name, list.add(baseTabBarItem(_model.tabs[i].name,
leftPadding: i == 0 ? 24 : 28, leftPadding: i == 0 ? 21.5 : 14,
rightPadding: i == _model.tabs.length - 1 ? 24 : 28)); rightPadding: i == _model.tabs.length - 1 ? 21.5 : 14));
} }
return list; return list;
} }
......
...@@ -458,17 +458,30 @@ Widget baseTabBar( ...@@ -458,17 +458,30 @@ Widget baseTabBar(
Widget baseTabBarItem(String text, Widget baseTabBarItem(String text,
{double leftPadding, double rightPadding, double wantWidth}) { {double leftPadding, double rightPadding, double wantWidth}) {
leftPadding = leftPadding ?? 28.0; leftPadding = leftPadding ?? 14.0;
rightPadding = rightPadding ?? 28.0; rightPadding = rightPadding ?? 14.0;
double width = leftPadding + text.length * 16.0 + rightPadding; return Row(
return Container( mainAxisSize: MainAxisSize.min,
height: 40.0, children: <Widget>[
width: wantWidth ?? width, Container(
alignment: Alignment.center, width: leftPadding,
child: Tab( ),
Tab(
text: text, text: text,
), ),
Container(
width: rightPadding,
)
],
); );
// Container(
// height: 40.0,
// width: wantWidth ?? width,
// alignment: Alignment.center,
// child: Tab(
// text: text,
// ),
// );
} }
Widget baseSliverAppBar(String url, Widget baseSliverAppBar(String url,
...@@ -485,8 +498,7 @@ Widget baseSliverAppBar(String url, ...@@ -485,8 +498,7 @@ Widget baseSliverAppBar(String url,
imageUrl: url ?? '', imageUrl: url ?? '',
fit: BoxFit.cover, fit: BoxFit.cover,
) )
: Container( : Container(),
),
), ),
); );
} }
......
...@@ -120,7 +120,7 @@ class Home extends StatefulWidget { ...@@ -120,7 +120,7 @@ class Home extends StatefulWidget {
class HomeState extends State<Home> { class HomeState extends State<Home> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ScreenUtil.init(context, width: 375, height: 810); ScreenUtil.init(context, width: 375, height: 667);
return isDebug return isDebug
? RouterCenterImpl().findMainRouter().getTestPage() ? RouterCenterImpl().findMainRouter().getTestPage()
: Container( : Container(
......
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