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