Commit 890505ea authored by 朱翠翠's avatar 朱翠翠

Merge branch 'test' of http://git.wanmeizhensuo.com/linshengyu/gm_flutter into zcc/flutter

parents 7ede758c d8093190
......@@ -348,10 +348,10 @@ class LevelTwoState extends BaseState<LevelTwoPage>
children: <Widget>[
Container(
margin: EdgeInsets.only(left: 2, right: 2),
child: baseText(element.attrName, 14, Color(0xff282828),
child: baseText(element.attrValue, 14, Color(0xff282828),
bold: true),
),
baseText(element.attrValue, 11, Color(0xff999999)),
baseText(element.attrName, 11, Color(0xff999999)),
],
),
),
......
......@@ -56,22 +56,14 @@ class FilterViewState extends State<FilterView> {
height: 186,
child: Stack(
children: <Widget>[
Positioned(
top: 0,
child: Container(
width: MediaQuery.of(context).size.width,
height: 1,
decoration: BoxDecoration(
boxShadow: [
BoxShadow(
color: Color(0x08000000),
offset: Offset(0.0,1.0),
blurRadius: 6.0,
spreadRadius: 0.0),
],
),
),
),
// Positioned(
// top: 0,
// child: Container(
// width: MediaQuery.of(context).size.width,
// height: 6,
// child: Image.asset("assets/shadow.png"),
// ),
// ),
Positioned(
top: 54.5,
right: 15,
......
......@@ -28,7 +28,7 @@ class PlanItem extends StatelessWidget {
if (i != plans.baseAttrs.length - 1) {
list.add(Container(
width: 8.5,
height: 10,
height: 11,
alignment: Alignment.topCenter,
child: Container(
width: 0.5,
......@@ -56,11 +56,14 @@ class PlanItem extends StatelessWidget {
showOprea = showOprea.length > 4 ? showOprea.substring(0, 4) : showOprea;
}
return Container(
margin: EdgeInsets.only(top: 4, left: 10, right: 10),
width: double.maxFinite,
margin: EdgeInsets.only(top: 4, left: 8, right: 8),
child: Card(
elevation: 3.0,
shadowColor: Color(0x08000000),
elevation: 2.0,
child: Container(
height: 90,
width: double.maxFinite,
decoration: BoxDecoration(
color: Colors.white, borderRadius: BorderRadius.circular(4)),
child: Stack(
......@@ -98,17 +101,18 @@ class PlanItem extends StatelessWidget {
height: 0,
)
: Container(
// constraints: BoxConstraints(maxWidth: 60),
margin: EdgeInsets.only(left: 4),
child: Container(
padding: EdgeInsets.only(
top: 2, bottom: 2, left: 3, right: 3),
top: 0.5, bottom: 1, left: 3, right: 3),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(2),
color: Color(0xffF0F9F7)),
alignment: Alignment.center,
child:
baseText(showOprea, 11, Color(0xff3FB5AF)),
child: baseText(
showOprea,
11,
Color(0xff3FB5AF),
),
),
)
],
......@@ -133,7 +137,7 @@ class PlanItem extends StatelessWidget {
),
Positioned(
left: 91,
bottom: 8,
bottom: 12,
child: Container(
width: MediaQuery.of(context).size.width - 30 - 91 - 10,
child: Row(
......@@ -164,7 +168,7 @@ class PlanItem extends StatelessWidget {
),
Positioned(
left: 92,
top: 36,
top: 32,
child: Row(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.end,
......
......@@ -86,15 +86,24 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin {
@override
Widget buildItem(BuildContext context) {
stateBarHeight = MediaQueryData.fromWindow(window).padding.top;
stateBarHeight = MediaQueryData
.fromWindow(window)
.padding
.top;
topHeight = stateBarHeight + kToolbarHeight;
return Scaffold(
body: MediaQuery.removePadding(
removeTop: true,
context: context,
child: baseStateView(
MediaQuery.of(context).size.width,
MediaQuery.of(context).size.height,
MediaQuery
.of(context)
.size
.width,
MediaQuery
.of(context)
.size
.height,
_model.stateLive,
newHome(), () {
_model.stateLive.notifyView(LOADING);
......@@ -104,15 +113,28 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin {
}
Widget newHome() {
double diff = Platform.isAndroid ? 50.0 : 0.0;
return Container(
width: MediaQuery.of(context).size.width,
width: MediaQuery
.of(context)
.size
.width,
//主页 剪去tabbar高度
height: MediaQuery.of(context).size.height - 50,
height: MediaQuery
.of(context)
.size
.height -diff,
child: Stack(
children: <Widget>[
Container(
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height - 50,
width: MediaQuery
.of(context)
.size
.width,
height: MediaQuery
.of(context)
.size
.height - diff,
// child: child(),
child: homeWarp(),
),
......@@ -126,13 +148,19 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin {
child: Visibility(
visible: data.data[2] > 0.1,
child: Container(
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height,
width: MediaQuery
.of(context)
.size
.width,
height: MediaQuery
.of(context)
.size
.height,
child: Column(
children: <Widget>[
Container(
height:
data.data[1] - 45 < 0 ? 0 : data.data[1] - 45,
data.data[1] - 45 < 0 ? 0 : data.data[1] - 45,
color: Colors.transparent,
),
Container(
......@@ -178,15 +206,18 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin {
return BasePopMenu(
leftPos: data.data[0],
topPos: data.data[1],
width: MediaQuery.of(context).size.width,
width: MediaQuery
.of(context)
.size
.width,
maxHeight: 450,
listener: projectMenuListener,
child:
ProjectView(_model.projectSelectIndex, _model.projectData,
ProjectView(_model.projectSelectIndex, _model.projectData,
(id, name, index) {
clickIndexOther(0);
_model.projectClick(id, name, index);
}),
clickIndexOther(0);
_model.projectClick(id, name, index);
}),
proListener: (pro) {
_model.backProgress(pro, 0);
},
......@@ -199,7 +230,10 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin {
return BasePopMenu(
leftPos: data.data[0],
topPos: data.data[1],
width: MediaQuery.of(context).size.width,
width: MediaQuery
.of(context)
.size
.width,
maxHeight: 45 * _model.sortList.length,
listener: sortMenuListener,
child: SortView(_model.sortList, _model.sortPos, (index) {
......@@ -219,11 +253,14 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin {
return BasePopMenu(
leftPos: data.data[0],
topPos: data.data[1],
width: MediaQuery.of(context).size.width,
width: MediaQuery
.of(context)
.size
.width,
maxHeight: 186,
listener: filterMenuListener,
child: FilterView(
(max, min) {
(max, min) {
clickIndexOther(2);
_model.filterClick(max, min);
},
......@@ -334,22 +371,23 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin {
return <Widget>[
SliverOverlapAbsorber(
handle:
NestedScrollView.sliverOverlapAbsorberHandleFor(context),
NestedScrollView.sliverOverlapAbsorberHandleFor(context),
sliver: baseSliverAppBar(null,
height: kToolbarHeight + stateBarHeight, needpic: false)),
height: kToolbarHeight + stateBarHeight - 39,
needpic: false)),
SliverList(
delegate: SliverChildBuilderDelegate((BuildContext c, int i) {
if (i == 0) {
return Container(
height: kToolbarHeight,
);
}
return towPic();
}, childCount: 2)),
if (i == 0) {
return Container(
height: kToolbarHeight,
);
}
return towPic();
}, childCount: 2)),
SliverPersistentHeader(
pinned: true,
delegate:
StickyTabBarDelegateWithSize(child: planBar(), height: 45),
StickyTabBarDelegateWithSize(child: planBar(), height: 45),
)
];
},
......@@ -362,29 +400,47 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin {
initialData: _model.feedsLive.data ?? Pair(LOADING, null),
builder: (c, data) {
if (data.data.first == FAIL) {
return errorItem(MediaQuery.of(context).size.width,
MediaQuery.of(context).size.height, () {
_model.feedsLive.notifyView(Pair(LOADING, null));
_model.refreshFeed(true);
});
return errorItem(MediaQuery
.of(context)
.size
.width,
MediaQuery
.of(context)
.size
.height, () {
_model.feedsLive.notifyView(Pair(LOADING, null));
_model.refreshFeed(true);
});
}
if (data.data.first == LOADING) {
return Container(
color: Colors.white,
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height,
width: MediaQuery
.of(context)
.size
.width,
height: MediaQuery
.of(context)
.size
.height,
child: loadingItem(),
);
}
if (data.data.first == EMPTY) {
return emptyItem(MediaQuery.of(context).size.width,
MediaQuery.of(context).size.height);
return emptyItem(MediaQuery
.of(context)
.size
.width,
MediaQuery
.of(context)
.size
.height);
}
return Container(
color: Color(0xffF7F6FA),
child: baseRefreshView(
refreshController,
() {
() {
_model.refreshFeed(true, controller: refreshController);
},
null,
......@@ -394,7 +450,7 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin {
slivers: <Widget>[
SliverList(
delegate: SliverChildBuilderDelegate(
(BuildContext context, int index) {
(BuildContext context, int index) {
if (data.data.second.length == 0) {
if (_model.page != 1) {
refreshController.loadNoData();
......@@ -402,10 +458,16 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin {
} else {
refreshController.loadComplete();
}
if (index == 0) {
return Container(
height: 6,
color: Color(0xffF7F6FA),
);
}
return PlanItem(
_model.feedDatas[index], index, true, "");
_model.feedDatas[index - 1], index - 1, true, "");
},
childCount: _model.feedDatas.length,
childCount: _model.feedDatas.length + 1,
),
)
],
......@@ -436,7 +498,7 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin {
borderRadius: BorderRadius.circular(3),
child: CachedNetworkImage(
imageUrl:
data.data == null ? "" : data.data[0].icon ?? "",
data.data == null ? "" : data.data[0].icon ?? "",
fit: BoxFit.cover,
)).gestureDetector(() {
Map<String, dynamic> map = {
......@@ -468,7 +530,7 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin {
borderRadius: BorderRadius.circular(3),
child: CachedNetworkImage(
imageUrl:
data.data == null ? "" : data.data[1].icon ?? "",
data.data == null ? "" : data.data[1].icon ?? "",
fit: BoxFit.cover,
)).gestureDetector(() {
Map<String, dynamic> map = {
......@@ -525,7 +587,7 @@ class PlanState extends BaseState<PlanPage> with TickerProviderStateMixin {
double bottom =
// WidgetUtil.buttonLeftMenuPosition(globalKey.currentContext)?.top ??
topPos == null ? 0.0 : topPos.dy + 45;
topPos == null ? 0.0 : topPos.dy + 45;
if (bottom < 45) {
bottom = 45;
}
......
......@@ -108,7 +108,7 @@ class PlanProgressBarState extends State<PlanProgressBar> {
widget.highLive.notifyView(textStr);
}
double textWidth = textStr.length * 12.0+6;
double textWidth =13+ (textStr.length-1) * 6.0+21;
if (textStr == "无限") {
textWidth = textStr.length * 14.0+12;
}
......@@ -152,13 +152,13 @@ class PlanProgressBarState extends State<PlanProgressBar> {
// textLeft >= 0
child: Container(
width: textWidth,
height: 42,
height: 37,
child: Stack(
alignment: AlignmentDirectional.topCenter,
children: <Widget>[
Container(
width: textWidth,
height: 37,
height: 32,
color: Colors.white,
child: Container(
decoration: BoxDecoration(
......@@ -168,7 +168,7 @@ class PlanProgressBarState extends State<PlanProgressBar> {
),
),
Positioned(
top: 36.9,
top: 31.9,
child: Container(
width: 9,
height: 5,
......@@ -178,7 +178,7 @@ class PlanProgressBarState extends State<PlanProgressBar> {
),
),
Positioned(
top: 10,
top: 6,
child: Container(
width: textWidth,
alignment: Alignment.topCenter,
......
......@@ -17,6 +17,7 @@ class TopList extends StatefulWidget {
double topHeight;
final String rankId;
String tabName;
TopList(this.rankId, this.id, this.topHeight, this.tabName);
@override
......@@ -75,6 +76,12 @@ class TopListState extends State<TopList> with AutomaticKeepAliveClientMixin {
// extend.SliverOverlapInjector(
// handle: NestedScrollView.sliverOverlapAbsorberHandleFor(context),
// ),
SliverToBoxAdapter(
child: Container(
height: 6,
color: Color(0xffF7F6FA),
),
),
StreamBuilder<List<Plans>>(
stream: _model.datasLive.stream,
initialData: _model.datas ?? [],
......
......@@ -319,7 +319,7 @@ Widget baseRefreshView(RefreshController refreshController,
// body = baseText("加载失败", 12, Color(0xff545454));
// } else
if (mode == LoadStatus.noMore) {
body = baseText("我们是有底线的", 12, Color(0xff545454));
body = baseText("我们是有底线的", 12, Color(0xff999999));
}
// else {
// body = Container();
......@@ -485,7 +485,8 @@ Widget baseSliverAppBar(String url,
imageUrl: url ?? '',
fit: BoxFit.cover,
)
: Container(),
: Container(
),
),
);
}
......
......@@ -17,6 +17,7 @@ rm -rf ${projectDir}/build
flutter build aar --release --target-platform android-arm
#rm -rf /Users/apple/lsy/gengmei_android/gm-flutter/libs/flutterApp.aar
cp -r ${projectDir}/build/host/outputs/repo/com/example/gm_flutter/flutter_release/1.0/flutter_release-1.0.aar /Users/zcc/Downloads/gm-flutter/libs/flutterApp.aar
#cp -r ${projectDir}/build/host/outputs/repo/com/example/gm_flutter/flutter_release/1.0/flutter_release-1.0.aar /Users/zcc/Downloads/gm-flutter/libs/flutterApp.aar
cp -r ${projectDir}/build/host/outputs/repo/com/example/gm_flutter/flutter_release/1.0/flutter_release-1.0.aar /Users/apple/lsy/gengmei_android/libs/flutterApp.aar
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