Commit 1c22b115 authored by 林生雨's avatar 林生雨

Merge branch 'zx/gmFlutter' into 'test'

Zx/gm flutter

See merge request !37
parents 735d25bd 5a6f5e70
......@@ -15,8 +15,9 @@ class PlanItem extends StatelessWidget {
final Plans plans;
final int pos;
final bool isPlanPage;
String tabName;
PlanItem(this.plans, this.pos, this.isPlanPage);
PlanItem(this.plans, this.pos, this.isPlanPage, this.tabName);
@override
Widget build(BuildContext context) {
......@@ -156,24 +157,25 @@ class PlanItem extends StatelessWidget {
),
),
).gestureDetector(() {
Map<String, dynamic> map;
map = {
"tab_name": isPlanPage ? "plan_home" : "",
Map<String, dynamic> buriedMap = {
"tab_name": tabName,
"position": pos,
"card_id": plans.id,
"card_type": "card",
"transaction_type": "",
"card_content_type": "level_one_plan"
};
RouterCenterImpl().findMainRouter().buriedEvent("on_click_card", map);
Map<String, dynamic> buriedMap = {
RouterCenterImpl()
.findMainRouter()
.buriedEvent("on_click_card", buriedMap);
Map<String, dynamic> map = {
"business_id": "${plans.id}",
"planId": plans.id,
"title": "${plans.name}"
};
RouterCenterImpl()
.findMainRouter()
.jumpPage(context, "level_one_plan_detail", buriedMap, false);
.jumpPage(context, "level_one_plan_detail", map, false);
}));
}
}
......@@ -16,8 +16,8 @@ class TopList extends StatefulWidget {
final int id;
double topHeight;
final String rankId;
TopList(this.rankId, this.id, this.topHeight);
String tabName;
TopList(this.rankId, this.id, this.topHeight, this.tabName);
@override
State<StatefulWidget> createState() => TopListState();
......@@ -88,7 +88,8 @@ class TopListState extends State<TopList> with AutomaticKeepAliveClientMixin {
itemExtent: 100,
delegate: SliverChildBuilderDelegate(
(BuildContext context, int index) {
return PlanItem(_model.datas[index], index, false);
return PlanItem(
_model.datas[index], index, false, widget.tabName);
},
childCount: _model.datas.length,
),
......@@ -112,7 +113,7 @@ class TopListState extends State<TopList> with AutomaticKeepAliveClientMixin {
],
), onLoading: () {
_model.loadMore();
}, pullDown: false, pullUp: true,loadMoreColor: Color(0xffF7F6FA));
}, pullDown: false, pullUp: true, loadMoreColor: Color(0xffF7F6FA));
}
@override
......
......@@ -160,7 +160,8 @@ class TopPageState extends BaseState<TopPage> with TickerProviderStateMixin {
for (int i = 0; i < _model.tabs.length; i++) {
list.add(extend.NestedScrollViewInnerScrollPositionKeyWidget(
Key("Tab${i}"),
TopList(widget.id, _model.tabs[i].id, kToolbarHeight + d)));
TopList(widget.id, _model.tabs[i].id, kToolbarHeight + d,
_model.tabs[i].name)));
}
return extend.NestedScrollView(
innerScrollPositionKeyBuilder: () {
......
......@@ -8,16 +8,16 @@ environment:
dependencies:
flutter:
sdk: flutter
# cupertino_icons: ^0.1.3
# cupertino_icons: ^0.1.3
cached_network_image: ^2.2.0+1
flutter_boost:
git:
url: 'https://github.com/alibaba/flutter_boost.git'
ref: 'v1.17.1-hotfixes'
url: "https://github.com/alibaba/flutter_boost.git"
ref: "v1.17.1-hotfixes"
flutter_common:
git:
url: 'https://github.com/asd451398533/flutter_common.git'
ref: '8175a0900ac0244040289488b86c5a98c45b0e94'
url: "https://github.com/asd451398533/flutter_common.git"
ref: "8175a0900ac0244040289488b86c5a98c45b0e94"
#网络库
dio: ^3.0.0
dio_cookie_manager: ^1.0.0
......@@ -38,11 +38,10 @@ dependencies:
flutter_screenutil: ^1.1.0
common_utils: ^1.2.1
dev_dependencies:
flutter_test:
sdk: flutter
source_gen: '>=0.8.0'
source_gen: ">=0.8.0"
build_runner: ^1.9.0
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