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

w

parent b1742a37
...@@ -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,130 +20,154 @@ class PlanItem extends StatelessWidget { ...@@ -20,130 +20,154 @@ 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];
} }
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: Container( child: Card(
height: 90, elevation: 1.0,
decoration: BoxDecoration( child: Container(
color: Colors.white, borderRadius: BorderRadius.circular(4)), height: 90,
child: Stack( decoration: BoxDecoration(
children: <Widget>[ color: Colors.white, borderRadius: BorderRadius.circular(4)),
Positioned( child: Stack(
top: 10, children: <Widget>[
left: 10, Positioned(
child: Container( top: 10,
width: 70, left: 10,
height: 70, child: Container(
child: ClipRRect( width: 70,
borderRadius: BorderRadius.circular(4), height: 70,
child: CachedNetworkImage( child: ClipRRect(
imageUrl: plans.projectImage, borderRadius: BorderRadius.circular(4),
fit: BoxFit.cover, child: CachedNetworkImage(
imageUrl: plans.projectImage,
fit: BoxFit.cover,
),
),
), ),
), ),
), Positioned(
), left: 92,
Positioned( top: 14,
left: 92, child: Row(
top: 14, crossAxisAlignment: CrossAxisAlignment.center,
child: Row( mainAxisSize: MainAxisSize.min,
mainAxisSize: MainAxisSize.min, children: <Widget>[
children: <Widget>[ baseText(plans.name, 14, Color(0xff282828), bold: true),
baseText(plans.name, 14, Color(0xff282828)), Container(
Container( margin: EdgeInsets.only(left: 4),
margin: EdgeInsets.only(left: 4), child: Container(
child: Container( width: 28,
width: 28, height: 15,
height: 15, decoration: BoxDecoration(
decoration: BoxDecoration( borderRadius: BorderRadius.circular(2),
borderRadius: BorderRadius.circular(2), color: Color(0xffF0F9F7)),
color: Color(0xffF0F9F7)), alignment: Alignment.center,
alignment: Alignment.center, child:
child: baseText("??", 11, Color(0xff3FB5AF)), baseText("??", 11, Color(0xff3FB5AF), bold: true),
), ),
) )
], ],
),
),
Positioned(
top: 13,
right: 10,
child: Row(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.end,
children: <Widget>[
baseText("好评率", 11, Color(0xff282828)),
Container(
width: 4,
), ),
baseText("${rate}", 14, Color(0xffFF5963)), ),
baseText("%", 11, Color(0xffFF5963)), Positioned(
], top: 14,
), right: 10,
), child: Row(
Positioned( mainAxisSize: MainAxisSize.min,
bottom: 14, // crossAxisAlignment: CrossAxisAlignment.end,
right: 10, verticalDirection: VerticalDirection.down,
child: baseText("销量${NumPlanUtil.getSale(plans.salesCount)}", 11, Color(0xff282828)),
), children: <Widget>[
Positioned( baseText("好评率", 11, Color(0xff282828)),
left: 91, Container(
bottom: 14, width: 4,
child: Row( ),
mainAxisSize: MainAxisSize.min, baseText("${rate}", 14, Color(0xffFF5963)),
children: <Widget>[ baseText("%", 10, Color(0xffFF5963)),
baseText("¥", 10, Color(0xffFF5963)), ],
baseText("${plans.minPrice}-${plans.maxPrice}", 13, ),
Color(0xffFF5963)), ),
], Positioned(
), bottom: 14,
right: 10,
child: baseText("销量${NumPlanUtil.getSale(plans.salesCount)}",
11, Color(0xff282828)),
),
Positioned(
left: 91,
bottom: 14,
child: Row(
verticalDirection: VerticalDirection.down,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
baseText("¥", 10, Color(0xffFF5963)),
baseText("${plans.minPrice}-${plans.maxPrice}", 13,
Color(0xffFF5963),
bold: true),
],
),
),
Positioned(
left: 92,
top: 36,
child: Row(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.center,
children: list,
),
)
],
), ),
Positioned( ),
left: 92, ).gestureDetector(() {
top: 36, Map<String, dynamic> map;
child: if (isPlanPage) {
baseText("${stringBuffer.toString()}", 11, Color(0xff999999)), map = {
) "page_name": "plan_home",
], "tab_name": "plan_home",
), "referrer_id": "",
), "referrer": "",
).gestureDetector(() { "position": pos,
Map<String, dynamic> map; "business_id": "",
if (isPlanPage) { "card_id": plans.id,
map = { "card_type": "card",
"page_name": "plan_home", "transaction_type": "",
"tab_name": "plan_home", "card_content_type": "level_one_plan"
"referrer_id": "", };
"referrer": "", }
"position": pos,
"business_id": "",
"card_id": plans.id,
"card_type": "card",
"transaction_type": "",
"card_content_type": "level_one_plan"
};
}
RouterCenterImpl().findMainRouter().buriedEvent("on_click_card", map); RouterCenterImpl().findMainRouter().buriedEvent("on_click_card", map);
RouterCenterImpl().findMainRouter().jumpPage( RouterCenterImpl().findMainRouter().jumpPage(
context, context,
"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(
color: Colors.white, decoration: BoxDecoration(
boxShadow: [
BoxShadow(
color: Colors.black12,
offset: Offset(0.0, 1.0), //阴影xy轴偏移量
blurRadius: 1.0, //阴影模糊程度
spreadRadius: 1.0 //阴影扩散程度
)
],
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,9 +159,12 @@ class PlanProgressBarState extends State<PlanProgressBar> { ...@@ -157,9 +159,12 @@ class PlanProgressBarState extends State<PlanProgressBar> {
Container( Container(
width: textWidth, width: textWidth,
height: 37, height: 37,
decoration: BoxDecoration( color: Colors.white,
color: Color(0x99000000), child: Container(
borderRadius: BorderRadius.circular(6), decoration: BoxDecoration(
color: Color(0x99000000),
borderRadius: BorderRadius.circular(6),
),
), ),
), ),
Positioned( Positioned(
...@@ -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(
onTap: clickItem, decoration: BoxDecoration(
controller: controller, color: Colors.white,
indicatorSize: TabBarIndicatorSize.tab, boxShadow: [
isScrollable: scroll ?? true, BoxShadow(
unselectedLabelColor: color ?? Color(0xffB5B5B5), color: Colors.black12,
labelColor: color ?? Color(0xff282828), offset: Offset(0.0, 1.0), //阴影xy轴偏移量
labelStyle: TextStyle(fontSize: fontSize ?? 16), blurRadius: 1.0, //阴影模糊程度
unselectedLabelStyle: TextStyle(fontSize: fontSize ?? 16), spreadRadius: 1.0 //阴影扩散程度
labelPadding: EdgeInsets.only(), )
indicator: baseIndicator ?? BaseIndicator(), ],
tabs: list, ),
); child: TabBar(
onTap: clickItem,
controller: controller,
indicatorSize: TabBarIndicatorSize.tab,
isScrollable: scroll ?? true,
unselectedLabelColor: color ?? Color(0xffB5B5B5),
labelColor: color ?? Color(0xff282828),
labelStyle:
TextStyle(fontSize: fontSize ?? 16, fontWeight: FontWeight.w500),
unselectedLabelStyle:
TextStyle(fontSize: fontSize ?? 16, fontWeight: FontWeight.w500),
labelPadding: EdgeInsets.only(),
indicator: baseIndicator ?? BaseIndicator(),
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