Commit 05fdeeeb authored by 林生雨's avatar 林生雨

w

parent b1742a37
...@@ -63,7 +63,7 @@ class LevelOneItem extends StatelessWidget { ...@@ -63,7 +63,7 @@ class LevelOneItem extends StatelessWidget {
onTap: () { onTap: () {
RouterCenterImpl() RouterCenterImpl()
.findMainRouter() .findMainRouter()
.jumpPage(context, cards.doctor.messageUrl, {}, true); .jumpPage(context, cards.doctor.messageUrl, null, true);
}, },
child: Container( child: Container(
margin: EdgeInsets.only(left: 15, right: 15), margin: EdgeInsets.only(left: 15, right: 15),
...@@ -85,7 +85,7 @@ class LevelOneItem extends StatelessWidget { ...@@ -85,7 +85,7 @@ class LevelOneItem extends StatelessWidget {
), ),
Positioned( Positioned(
left: 57, left: 57,
top: 44, top: 48,
child: FiveStarView(int.parse(cards.doctor.star), 5), child: FiveStarView(int.parse(cards.doctor.star), 5),
), ),
Positioned( Positioned(
...@@ -99,7 +99,7 @@ class LevelOneItem extends StatelessWidget { ...@@ -99,7 +99,7 @@ class LevelOneItem extends StatelessWidget {
bold: true), bold: true),
Container( Container(
margin: EdgeInsets.only(left: 4), margin: EdgeInsets.only(left: 4),
child: baseText(cards.doctor.title, 15, Color(0xff333333), child: baseText(cards.doctor.title, 13, Color(0xff999999),
bold: true), bold: true),
) )
], ],
...@@ -119,15 +119,38 @@ class LevelOneItem extends StatelessWidget { ...@@ -119,15 +119,38 @@ class LevelOneItem extends StatelessWidget {
), ),
), ),
Positioned( Positioned(
left: 57,
bottom: 15, bottom: 15,
right: 0, child: Container(
width: MediaQuery
.of(context)
.size
.width - 30 - 57,
child: Row(
children: <Widget>[
Expanded(
child: askWidget(),
),
Container(
width: 15,
),
Expanded(
child: lowPriceWidget(), child: lowPriceWidget(),
)
],
), ),
Positioned(
bottom: 15,
right: 137,
child: askWidget(),
), ),
),
// Positioned(
// bottom: 15,
// right: 0,
// child: lowPriceWidget(),
// ),
// Positioned(
// bottom: 15,
// right: 137,
// child: askWidget(),
// ),
// Positioned( // Positioned(
// left: 4.5, // left: 4.5,
// bottom: 25, // bottom: 25,
...@@ -137,7 +160,10 @@ class LevelOneItem extends StatelessWidget { ...@@ -137,7 +160,10 @@ class LevelOneItem extends StatelessWidget {
left: 0, left: 0,
bottom: 0, bottom: 0,
child: Container( child: Container(
width: MediaQuery.of(context).size.width - 30, width: MediaQuery
.of(context)
.size
.width - 30,
height: 0.5, height: 0.5,
color: Color(0xffE5E5E5), color: Color(0xffE5E5E5),
), ),
...@@ -153,7 +179,12 @@ class LevelOneItem extends StatelessWidget { ...@@ -153,7 +179,12 @@ class LevelOneItem extends StatelessWidget {
throw new Exception(); throw new Exception();
} }
return GestureDetector( return GestureDetector(
onTap: () {}, behavior: HitTestBehavior.opaque,
onTap: () {
RouterCenterImpl()
.findMainRouter()
.jumpPage(context, cards.hospital.messageUrl, null, true);
},
child: Container( child: Container(
margin: EdgeInsets.only(left: 15, right: 15), margin: EdgeInsets.only(left: 15, right: 15),
height: 149, height: 149,
...@@ -175,9 +206,12 @@ class LevelOneItem extends StatelessWidget { ...@@ -175,9 +206,12 @@ class LevelOneItem extends StatelessWidget {
Positioned( Positioned(
left: 57, left: 57,
top: 17.5, top: 17.5,
child: Container(
width: MediaQuery.of(context).size.width-30-57,
child: baseText(cards.hospital.name, 15, Color(0xff333333), child: baseText(cards.hospital.name, 15, Color(0xff333333),
bold: true), bold: true),
), ),
),
Positioned( Positioned(
top: 42.5, top: 42.5,
right: 0, right: 0,
...@@ -189,40 +223,66 @@ class LevelOneItem extends StatelessWidget { ...@@ -189,40 +223,66 @@ class LevelOneItem extends StatelessWidget {
baseText( baseText(
"${cards.hospital.minPrice}-${cards.hospital.maxPrice}", "${cards.hospital.minPrice}-${cards.hospital.maxPrice}",
15, 15,
Color(0xffFF5963)), Color(0xffFF5963),bold: true),
], ],
), ),
), ),
Positioned( Positioned(
bottom: 15, bottom: 15,
right: 0, left: 57,
child: Container(
width: MediaQuery
.of(context)
.size
.width - 30 - 57,
child: Row(
children: <Widget>[
Expanded(
child: askWidget(),
),
Container(
width: 15,
),
Expanded(
child: lowPriceWidget(), child: lowPriceWidget(),
)
],
), ),
Positioned(
bottom: 15,
right: 137,
child: askWidget(),
), ),
Positioned(
left: 4.5,
bottom: 25,
child: compareWidget(),
), ),
// 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: 67, bottom: 63.5,
left: 57, left: 57,
child: baseText(cards.hospital.address, 12, Color(0xff666666)), child: baseText(cards.hospital.address, 12, Color(0xff666666)),
), ),
Positioned( Positioned(
left: 57, left: 57,
top: 43.5, 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,
child: Container( child: Container(
width: MediaQuery.of(context).size.width - 30, width: MediaQuery
.of(context)
.size
.width - 30,
height: 0.5, height: 0.5,
color: Color(0xffE5E5E5), color: Color(0xffE5E5E5),
), ),
...@@ -296,7 +356,10 @@ class LevelOneItem extends StatelessWidget { ...@@ -296,7 +356,10 @@ class LevelOneItem extends StatelessWidget {
left: 0, left: 0,
bottom: 0, bottom: 0,
child: Container( child: Container(
width: MediaQuery.of(context).size.width - 30, width: MediaQuery
.of(context)
.size
.width - 30,
height: 0.5, height: 0.5,
color: Color(0xffE5E5E5), color: Color(0xffE5E5E5),
), ),
......
...@@ -319,9 +319,10 @@ class LevelOneState extends BaseState<LevelOnePage> ...@@ -319,9 +319,10 @@ class LevelOneState extends BaseState<LevelOnePage>
child: baseText( child: baseText(
"${(_model.planoverItem.positiveRate.contains(".") ? _model.planoverItem.positiveRate.split(".")[0] : _model.planoverItem.positiveRate).replaceAll("%", "")}", "${(_model.planoverItem.positiveRate.contains(".") ? _model.planoverItem.positiveRate.split(".")[0] : _model.planoverItem.positiveRate).replaceAll("%", "")}",
20, 20,
Color(0xffFF5963)), Color(0xffFF5963),
bold: true),
), ),
baseText("%", 11, Color(0xffFF5963)), baseText("%", 10, Color(0xffFF5963)),
], ],
), ),
), ),
...@@ -329,7 +330,9 @@ class LevelOneState extends BaseState<LevelOnePage> ...@@ -329,7 +330,9 @@ class LevelOneState extends BaseState<LevelOnePage>
right: 15, right: 15,
bottom: 8, bottom: 8,
child: baseText( child: baseText(
"销量${NumPlanUtil.getSale(_model.planoverItem.salesCount)}", 11, Color(0xff666666)), "销量${NumPlanUtil.getSale(_model.planoverItem.salesCount)}",
11,
Color(0xff666666)),
) )
], ],
), ),
...@@ -364,7 +367,7 @@ class LevelOneState extends BaseState<LevelOnePage> ...@@ -364,7 +367,7 @@ class LevelOneState extends BaseState<LevelOnePage>
fontSize: 14, fontSize: 14,
color: Color(0xff282828), color: Color(0xff282828),
fontStyle: FontStyle.normal, fontStyle: FontStyle.normal,
fontWeight: FontWeight.w400), fontWeight: FontWeight.w500),
), ),
), ),
Container( Container(
...@@ -413,7 +416,8 @@ class LevelOneState extends BaseState<LevelOnePage> ...@@ -413,7 +416,8 @@ class LevelOneState extends BaseState<LevelOnePage>
Widget explain() { Widget explain() {
List<Widget> list = []; List<Widget> list = [];
list.add(Container( list.add(Container(
height: 31, height: 18,
margin: EdgeInsets.only(top: 0, bottom: 10),
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
baseText("项目说明", 15, Color(0xff282828)), baseText("项目说明", 15, Color(0xff282828)),
...@@ -435,9 +439,13 @@ class LevelOneState extends BaseState<LevelOnePage> ...@@ -435,9 +439,13 @@ class LevelOneState extends BaseState<LevelOnePage>
), ),
)); ));
if (_model.planoverItem != null) { if (_model.planoverItem != null) {
int index = 0;
_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: index == _model.planoverItem.explanationAttrs.length - 1
? 0
: 15),
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
Container( Container(
......
...@@ -56,23 +56,6 @@ class FilterViewState extends State<FilterView> { ...@@ -56,23 +56,6 @@ class FilterViewState extends State<FilterView> {
height: 186, height: 186,
child: Stack( child: Stack(
children: <Widget>[ children: <Widget>[
Positioned(
bottom: 74.5,
left: 0,
child: Container(
width: MediaQuery.of(context).size.width,
child: PlanProgressBar(
widget.low,
widget.high,
0,
20010,
widget.call,
lowLive,
highLive,
padding: 15,
),
),
),
Positioned( Positioned(
top: 54.5, top: 54.5,
right: 15, right: 15,
...@@ -113,7 +96,8 @@ class FilterViewState extends State<FilterView> { ...@@ -113,7 +96,8 @@ class FilterViewState extends State<FilterView> {
child: baseText("重置", 16, Color(0xff3FB5AF)), child: baseText("重置", 16, Color(0xff3FB5AF)),
alignment: Alignment.center, alignment: Alignment.center,
).gestureDetector(() { ).gestureDetector(() {
SimpleEventBus.instance().notifyListener("FilterViewState", "reset"); SimpleEventBus.instance()
.notifyListener("FilterViewState", "reset");
}), }),
), ),
Expanded( Expanded(
...@@ -129,7 +113,32 @@ class FilterViewState extends State<FilterView> { ...@@ -129,7 +113,32 @@ class FilterViewState extends State<FilterView> {
], ],
), ),
), ),
) ),
Positioned(
bottom: 44.5,
child: Container(
width: MediaQuery.of(context).size.width,
height: 0.5,
color: Color(0xff51CDC7),
),
),
Positioned(
bottom: 74.5,
left: 0,
child: Container(
width: MediaQuery.of(context).size.width,
child: PlanProgressBar(
widget.low,
widget.high,
0,
20010,
widget.call,
lowLive,
highLive,
padding: 15,
),
),
),
], ],
), ),
); );
......
...@@ -20,15 +20,27 @@ class PlanItem extends StatelessWidget { ...@@ -20,15 +20,27 @@ class PlanItem extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
StringBuffer stringBuffer = StringBuffer(); List<Widget> list = [];
int i = 0; int i = 0;
plans.baseAttrs.forEach((element) { plans.baseAttrs.forEach((element) {
stringBuffer.write(element); list.add(baseText("${element}", 11, Color(0xff999999)));
if (i != plans.baseAttrs.length - 1) { if (i != plans.baseAttrs.length - 1) {
stringBuffer.write("|"); list.add(Container(
width: 8.5,
height: 8,
alignment: Alignment.center,
child: Container(
width: 0.5,
height: 8,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(0.5),
color: Color(0xff999999)),
),
));
} }
i++; i++;
}); });
String rate = plans.positiveRate; String rate = plans.positiveRate;
if (rate != null && rate.contains(".")) { if (rate != null && rate.contains(".")) {
rate = rate.split(".")[0]; rate = rate.split(".")[0];
...@@ -36,6 +48,8 @@ class PlanItem extends StatelessWidget { ...@@ -36,6 +48,8 @@ class PlanItem extends StatelessWidget {
rate = rate.replaceAll("%", ""); rate = rate.replaceAll("%", "");
return Container( return Container(
margin: EdgeInsets.only(top: 10, left: 10, right: 10), margin: EdgeInsets.only(top: 10, left: 10, right: 10),
child: Card(
elevation: 1.0,
child: Container( child: Container(
height: 90, height: 90,
decoration: BoxDecoration( decoration: BoxDecoration(
...@@ -61,9 +75,10 @@ class PlanItem extends StatelessWidget { ...@@ -61,9 +75,10 @@ class PlanItem extends StatelessWidget {
left: 92, left: 92,
top: 14, top: 14,
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: <Widget>[ children: <Widget>[
baseText(plans.name, 14, Color(0xff282828)), baseText(plans.name, 14, Color(0xff282828), bold: true),
Container( Container(
margin: EdgeInsets.only(left: 4), margin: EdgeInsets.only(left: 4),
child: Container( child: Container(
...@@ -73,50 +88,59 @@ class PlanItem extends StatelessWidget { ...@@ -73,50 +88,59 @@ class PlanItem extends StatelessWidget {
borderRadius: BorderRadius.circular(2), borderRadius: BorderRadius.circular(2),
color: Color(0xffF0F9F7)), color: Color(0xffF0F9F7)),
alignment: Alignment.center, alignment: Alignment.center,
child: baseText("??", 11, Color(0xff3FB5AF)), child:
baseText("??", 11, Color(0xff3FB5AF), bold: true),
), ),
) )
], ],
), ),
), ),
Positioned( Positioned(
top: 13, top: 14,
right: 10, right: 10,
child: Row( child: Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.end, // crossAxisAlignment: CrossAxisAlignment.end,
verticalDirection: VerticalDirection.down,
children: <Widget>[ children: <Widget>[
baseText("好评率", 11, Color(0xff282828)), baseText("好评率", 11, Color(0xff282828)),
Container( Container(
width: 4, width: 4,
), ),
baseText("${rate}", 14, Color(0xffFF5963)), baseText("${rate}", 14, Color(0xffFF5963)),
baseText("%", 11, Color(0xffFF5963)), baseText("%", 10, Color(0xffFF5963)),
], ],
), ),
), ),
Positioned( Positioned(
bottom: 14, bottom: 14,
right: 10, right: 10,
child: baseText("销量${NumPlanUtil.getSale(plans.salesCount)}", 11, Color(0xff282828)), child: baseText("销量${NumPlanUtil.getSale(plans.salesCount)}",
11, Color(0xff282828)),
), ),
Positioned( Positioned(
left: 91, left: 91,
bottom: 14, bottom: 14,
child: Row( child: Row(
verticalDirection: VerticalDirection.down,
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: <Widget>[ children: <Widget>[
baseText("¥", 10, Color(0xffFF5963)), baseText("¥", 10, Color(0xffFF5963)),
baseText("${plans.minPrice}-${plans.maxPrice}", 13, baseText("${plans.minPrice}-${plans.maxPrice}", 13,
Color(0xffFF5963)), Color(0xffFF5963),
bold: true),
], ],
), ),
), ),
Positioned( Positioned(
left: 92, left: 92,
top: 36, top: 36,
child: child: Row(
baseText("${stringBuffer.toString()}", 11, Color(0xff999999)), mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.center,
children: list,
),
) )
], ],
), ),
...@@ -144,6 +168,6 @@ class PlanItem extends StatelessWidget { ...@@ -144,6 +168,6 @@ class PlanItem extends StatelessWidget {
"level_one_plan_detail", "level_one_plan_detail",
{"planId": plans.id, "title": "${plans.name}"}, {"planId": plans.id, "title": "${plans.name}"},
false); false);
}); }));
} }
} }
...@@ -90,20 +90,30 @@ class PlanModel extends BaseModel { ...@@ -90,20 +90,30 @@ class PlanModel extends BaseModel {
event.data.tags[0].subtags != null && event.data.tags[0].subtags != null &&
event.data.tags[0].subtags.length > 0) { event.data.tags[0].subtags.length > 0) {
tag_id = "${event.data.tags[0].subtags[0].tagId}"; tag_id = "${event.data.tags[0].subtags[0].tagId}";
PlanModelInstance.getInstance().tag_id = tag_id;
normalData[0] = "${event.data.tags[0].subtags[0].name}"; normalData[0] = "${event.data.tags[0].subtags[0].name}";
} }
sortList = event.data.orders; sortList = event.data.orders;
order_by = "${sortList[0].id}"; order_by = "${sortList[0].id}";
PlanModelInstance.getInstance().order_by = order_by;
min_price = "0"; min_price = "0";
max_price = "100000000"; max_price = "100000000";
PlanModelInstance.getInstance().min_price = min_price;
PlanModelInstance.getInstance().max_price = max_price;
low = 0; low = 0;
projectSelectIndex = 0; projectSelectIndex = 0;
PlanModelInstance.getInstance().projectSelectIndex = projectSelectIndex;
high = 20100; high = 20100;
sortPos = 0; sortPos = 0;
picLive.notifyView(event.data.ranks); picLive.notifyView(event.data.ranks);
stateLive.notifyView(ENDLOADING); stateLive.notifyView(ENDLOADING);
normalData[1] = event.data.orders[0].name; normalData[1] = event.data.orders[0].name;
PlanModelInstance.getInstance().normalData.clear();
PlanModelInstance.getInstance().normalData.addAll(normalData);
managerLive.notifyView(normalData); managerLive.notifyView(normalData);
PlanModelInstance.getInstance().low = low;
PlanModelInstance.getInstance().high = high;
PlanModelInstance.getInstance().sortPos = sortPos;
if (call != null) { if (call != null) {
SimpleEventBus.instance().notifyListener("FilterViewState", "reset"); SimpleEventBus.instance().notifyListener("FilterViewState", "reset");
SimpleEventBus.instance().notifyListener("ProjectViewState", "reset"); SimpleEventBus.instance().notifyListener("ProjectViewState", "reset");
...@@ -129,9 +139,13 @@ class PlanModel extends BaseModel { ...@@ -129,9 +139,13 @@ class PlanModel extends BaseModel {
return; return;
} }
projectSelectIndex = index; projectSelectIndex = index;
PlanModelInstance.getInstance().projectSelectIndex = projectSelectIndex;
normalData[0] = name; normalData[0] = name;
PlanModelInstance.getInstance().normalData.clear();
PlanModelInstance.getInstance().normalData.addAll(normalData);
managerLive.notifyView(normalData); managerLive.notifyView(normalData);
tag_id = id; tag_id = id;
PlanModelInstance.getInstance().tag_id = tag_id;
feedsLive.notifyView(Pair(LOADING, null)); feedsLive.notifyView(Pair(LOADING, null));
refreshFeed(true); refreshFeed(true);
} }
...@@ -195,16 +209,6 @@ class PlanModel extends BaseModel { ...@@ -195,16 +209,6 @@ class PlanModel extends BaseModel {
@override @override
void dispose() { void dispose() {
PlanModelInstance.getInstance().normalData.clear();
PlanModelInstance.getInstance().normalData.addAll(normalData);
PlanModelInstance.getInstance().tag_id = tag_id;
PlanModelInstance.getInstance().projectSelectIndex = projectSelectIndex;
PlanModelInstance.getInstance().order_by = order_by;
PlanModelInstance.getInstance().min_price = min_price;
PlanModelInstance.getInstance().max_price = max_price;
PlanModelInstance.getInstance().sortPos = sortPos;
PlanModelInstance.getInstance().low = low;
PlanModelInstance.getInstance().high = high;
stateLive.dispost(); stateLive.dispost();
picLive.dispost(); picLive.dispost();
rxDispose.dispose(); rxDispose.dispose();
...@@ -213,6 +217,7 @@ class PlanModel extends BaseModel { ...@@ -213,6 +217,7 @@ class PlanModel extends BaseModel {
backLive.dispost(); backLive.dispost();
feedsLive.dispost(); feedsLive.dispost();
showTab.dispost(); showTab.dispost();
print("LSY PLAN DISPOSE");
} }
void backProgress(double pro, int index) { void backProgress(double pro, int index) {
...@@ -231,8 +236,12 @@ class PlanModel extends BaseModel { ...@@ -231,8 +236,12 @@ class PlanModel extends BaseModel {
return; return;
} }
sortPos = index; sortPos = index;
PlanModelInstance.getInstance().sortPos = sortPos;
order_by = sortList[index].id.toString(); order_by = sortList[index].id.toString();
PlanModelInstance.getInstance().order_by = order_by;
normalData[1] = "${sortList[index].name}"; normalData[1] = "${sortList[index].name}";
PlanModelInstance.getInstance().normalData.clear();
PlanModelInstance.getInstance().normalData.addAll(normalData);
managerLive.notifyView(normalData); managerLive.notifyView(normalData);
feedsLive.notifyView(Pair(LOADING, null)); feedsLive.notifyView(Pair(LOADING, null));
refreshFeed(true); refreshFeed(true);
...@@ -247,8 +256,12 @@ class PlanModel extends BaseModel { ...@@ -247,8 +256,12 @@ class PlanModel extends BaseModel {
if (max > 20000) { if (max > 20000) {
max = 20000000; max = 20000000;
} }
PlanModelInstance.getInstance().low = low;
PlanModelInstance.getInstance().high = high;
max_price = "${max}"; max_price = "${max}";
min_price = "${min}"; min_price = "${min}";
PlanModelInstance.getInstance().min_price = min_price;
PlanModelInstance.getInstance().max_price = max_price;
feedsLive.notifyView(Pair(LOADING, null)); feedsLive.notifyView(Pair(LOADING, null));
refreshFeed(true); refreshFeed(true);
} }
......
...@@ -183,9 +183,11 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin { ...@@ -183,9 +183,11 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin {
width: MediaQuery.of(context).size.width, width: MediaQuery.of(context).size.width,
maxHeight: 450, maxHeight: 450,
listener: projectMenuListener, listener: projectMenuListener,
child: ProjectView(_model.projectSelectIndex,_model.projectData, (id, name,index) { child:
ProjectView(_model.projectSelectIndex, _model.projectData,
(id, name, index) {
clickIndexOther(0); clickIndexOther(0);
_model.projectClick(id, name,index); _model.projectClick(id, name, index);
}), }),
proListener: (pro) { proListener: (pro) {
_model.backProgress(pro, 0); _model.backProgress(pro, 0);
...@@ -200,7 +202,7 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin { ...@@ -200,7 +202,7 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin {
leftPos: data.data[0], leftPos: data.data[0],
topPos: data.data[1], topPos: data.data[1],
width: MediaQuery.of(context).size.width, width: MediaQuery.of(context).size.width,
maxHeight: 272, maxHeight: 45*_model.sortList.length,
listener: sortMenuListener, listener: sortMenuListener,
child: SortView(_model.sortList, _model.sortPos, (index) { child: SortView(_model.sortList, _model.sortPos, (index) {
clickIndexOther(1); clickIndexOther(1);
...@@ -422,7 +424,7 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin { ...@@ -422,7 +424,7 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin {
Widget towPic() { Widget towPic() {
return Container( return Container(
height: 90, height: 90,
margin: EdgeInsets.only(left: 15, right: 15, top: 15, bottom: 10), margin: EdgeInsets.only(left: 15, right: 15, top: 15, bottom: 0),
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
...@@ -487,7 +489,17 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin { ...@@ -487,7 +489,17 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin {
Widget planBar() { Widget planBar() {
return Container( return Container(
decoration: BoxDecoration(
boxShadow: [
BoxShadow(
color: Colors.black12,
offset: Offset(0.0, 1.0), //阴影xy轴偏移量
blurRadius: 1.0, //阴影模糊程度
spreadRadius: 1.0 //阴影扩散程度
)
],
color: Colors.white, color: Colors.white,
),
key: globalKey, key: globalKey,
child: planBarView, child: planBarView,
); );
......
...@@ -58,6 +58,8 @@ class PlanProgressBarState extends State<PlanProgressBar> { ...@@ -58,6 +58,8 @@ class PlanProgressBarState extends State<PlanProgressBar> {
if (str == "sure") { if (str == "sure") {
widget.call(high, low); widget.call(high, low);
} else { } else {
low = 0;
high = 20100;
widget.low = 0; widget.low = 0;
widget.high = 20100; widget.high = 20100;
init(); init();
...@@ -106,9 +108,9 @@ class PlanProgressBarState extends State<PlanProgressBar> { ...@@ -106,9 +108,9 @@ class PlanProgressBarState extends State<PlanProgressBar> {
widget.highLive.notifyView(textStr); widget.highLive.notifyView(textStr);
} }
double textWidth = textStr.length * 12.0; double textWidth = textStr.length * 12.0+6;
if (textStr == "无限") { if (textStr == "无限") {
textWidth = textStr.length * 14.0; textWidth = textStr.length * 14.0+12;
} }
double textL = textLeft * totle - textWidth / 2 + 9; double textL = textLeft * totle - textWidth / 2 + 9;
...@@ -157,11 +159,14 @@ class PlanProgressBarState extends State<PlanProgressBar> { ...@@ -157,11 +159,14 @@ class PlanProgressBarState extends State<PlanProgressBar> {
Container( Container(
width: textWidth, width: textWidth,
height: 37, height: 37,
color: Colors.white,
child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Color(0x99000000), color: Color(0x99000000),
borderRadius: BorderRadius.circular(6), borderRadius: BorderRadius.circular(6),
), ),
), ),
),
Positioned( Positioned(
top: 36.9, top: 36.9,
child: Container( child: Container(
...@@ -173,7 +178,7 @@ class PlanProgressBarState extends State<PlanProgressBar> { ...@@ -173,7 +178,7 @@ class PlanProgressBarState extends State<PlanProgressBar> {
), ),
), ),
Positioned( Positioned(
top: 12, top: 10,
child: Container( child: Container(
width: textWidth, width: textWidth,
alignment: Alignment.topCenter, alignment: Alignment.topCenter,
...@@ -210,6 +215,11 @@ class PlanProgressBarState extends State<PlanProgressBar> { ...@@ -210,6 +215,11 @@ class PlanProgressBarState extends State<PlanProgressBar> {
leftStarPosPercent = leftPosTempPercent; leftStarPosPercent = leftPosTempPercent;
setState(() {}); setState(() {});
}, },
onPointerCancel: (p){
textLeft = -1;
leftStarPosPercent = leftPosTempPercent;
setState(() {});
},
child: Container( child: Container(
width: 19, width: 19,
height: 19, height: 19,
...@@ -244,6 +254,11 @@ class PlanProgressBarState extends State<PlanProgressBar> { ...@@ -244,6 +254,11 @@ class PlanProgressBarState extends State<PlanProgressBar> {
rightStarPosPercent = rightPosTempPercent; rightStarPosPercent = rightPosTempPercent;
setState(() {}); setState(() {});
}, },
onPointerCancel: (p){
textLeft = -1;
rightStarPosPercent = rightPosTempPercent;
setState(() {});
},
child: Container( child: Container(
width: 19, width: 19,
height: 19, height: 19,
......
...@@ -426,19 +426,33 @@ Widget emptyItem(double width, double height, ...@@ -426,19 +426,33 @@ Widget emptyItem(double width, double height,
Widget baseTabBar( Widget baseTabBar(
TabController controller, List<Widget> list, Function(int index) clickItem, TabController controller, List<Widget> list, Function(int index) clickItem,
{BaseIndicator baseIndicator, double fontSize, Color color, bool scroll}) { {BaseIndicator baseIndicator, double fontSize, Color color, bool scroll}) {
return TabBar( return Container(
decoration: BoxDecoration(
color: Colors.white,
boxShadow: [
BoxShadow(
color: Colors.black12,
offset: Offset(0.0, 1.0), //阴影xy轴偏移量
blurRadius: 1.0, //阴影模糊程度
spreadRadius: 1.0 //阴影扩散程度
)
],
),
child: TabBar(
onTap: clickItem, onTap: clickItem,
controller: controller, controller: controller,
indicatorSize: TabBarIndicatorSize.tab, indicatorSize: TabBarIndicatorSize.tab,
isScrollable: scroll ?? true, isScrollable: scroll ?? true,
unselectedLabelColor: color ?? Color(0xffB5B5B5), unselectedLabelColor: color ?? Color(0xffB5B5B5),
labelColor: color ?? Color(0xff282828), labelColor: color ?? Color(0xff282828),
labelStyle: TextStyle(fontSize: fontSize ?? 16), labelStyle:
unselectedLabelStyle: TextStyle(fontSize: fontSize ?? 16), TextStyle(fontSize: fontSize ?? 16, fontWeight: FontWeight.w500),
unselectedLabelStyle:
TextStyle(fontSize: fontSize ?? 16, fontWeight: FontWeight.w500),
labelPadding: EdgeInsets.only(), labelPadding: EdgeInsets.only(),
indicator: baseIndicator ?? BaseIndicator(), indicator: baseIndicator ?? BaseIndicator(),
tabs: list, tabs: list,
); ));
} }
Widget baseTabBarItem(String text, Widget baseTabBarItem(String text,
...@@ -500,7 +514,7 @@ Widget baseSliverBack(VoidCallback tap) { ...@@ -500,7 +514,7 @@ Widget baseSliverBack(VoidCallback tap) {
Widget baseSliverTitle(String text, double width, LiveData liveData) { Widget baseSliverTitle(String text, double width, LiveData liveData) {
return Positioned( return Positioned(
top: 48, top: 42,
child: StreamBuilder( child: StreamBuilder(
stream: liveData.stream, stream: liveData.stream,
initialData: liveData.data ?? 0.0, initialData: liveData.data ?? 0.0,
......
...@@ -271,8 +271,8 @@ packages: ...@@ -271,8 +271,8 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
path: "." path: "."
ref: de509ebaf4724de7c70d05ea403dbe13ecc775ea ref: "8175a0900ac0244040289488b86c5a98c45b0e94"
resolved-ref: de509ebaf4724de7c70d05ea403dbe13ecc775ea resolved-ref: "8175a0900ac0244040289488b86c5a98c45b0e94"
url: "https://github.com/asd451398533/flutter_common.git" url: "https://github.com/asd451398533/flutter_common.git"
source: git source: git
version: "0.0.1" version: "0.0.1"
......
...@@ -17,7 +17,7 @@ dependencies: ...@@ -17,7 +17,7 @@ dependencies:
flutter_common: flutter_common:
git: git:
url: 'https://github.com/asd451398533/flutter_common.git' url: 'https://github.com/asd451398533/flutter_common.git'
ref: 'de509ebaf4724de7c70d05ea403dbe13ecc775ea' ref: '8175a0900ac0244040289488b86c5a98c45b0e94'
#网络库 #网络库
dio: ^3.0.0 dio: ^3.0.0
dio_cookie_manager: ^1.0.0 dio_cookie_manager: ^1.0.0
......
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