|
|
@ -21,6 +21,8 @@ class _CommunityPage extends State<CommunityPage> |
|
|
|
TabController tabcontroller; |
|
|
|
TabController tabcontroller; |
|
|
|
|
|
|
|
|
|
|
|
CommunityChildPage guanzhu,tuijian ; |
|
|
|
CommunityChildPage guanzhu,tuijian ; |
|
|
|
|
|
|
|
final GlobalKey tuijianKey = GlobalKey(); |
|
|
|
|
|
|
|
final GlobalKey guanzhuKey = GlobalKey(); |
|
|
|
|
|
|
|
|
|
|
|
List<String> lables = [ |
|
|
|
List<String> lables = [ |
|
|
|
"关注", |
|
|
|
"关注", |
|
|
@ -41,6 +43,13 @@ class _CommunityPage extends State<CommunityPage> |
|
|
|
|
|
|
|
|
|
|
|
_toRelease() async { |
|
|
|
_toRelease() async { |
|
|
|
await Navigator.of(context).pushNamed('/router/release_dynamic'); |
|
|
|
await Navigator.of(context).pushNamed('/router/release_dynamic'); |
|
|
|
|
|
|
|
if(tabcontroller.index == 0){ |
|
|
|
|
|
|
|
CommunityChildPageState page = guanzhuKey.currentState; |
|
|
|
|
|
|
|
page.onRefresh(); |
|
|
|
|
|
|
|
}else if(tabcontroller.index == 1){ |
|
|
|
|
|
|
|
CommunityChildPageState page = tuijianKey.currentState; |
|
|
|
|
|
|
|
page.onRefresh(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@override |
|
|
|
@override |
|
|
@ -103,12 +112,12 @@ class _CommunityPage extends State<CommunityPage> |
|
|
|
} |
|
|
|
} |
|
|
|
else if(e == "分享健康"){ |
|
|
|
else if(e == "分享健康"){ |
|
|
|
if (tuijian == null){ |
|
|
|
if (tuijian == null){ |
|
|
|
tuijian = CommunityChildPage("分享健康"); |
|
|
|
tuijian = CommunityChildPage(tuijianKey,"分享健康"); |
|
|
|
} |
|
|
|
} |
|
|
|
return tuijian; |
|
|
|
return tuijian; |
|
|
|
}else if(e == "关注"){ |
|
|
|
}else if(e == "关注"){ |
|
|
|
if (guanzhu == null){ |
|
|
|
if (guanzhu == null){ |
|
|
|
guanzhu = CommunityChildPage("关注"); |
|
|
|
guanzhu = CommunityChildPage(guanzhuKey,"关注"); |
|
|
|
} |
|
|
|
} |
|
|
|
return guanzhu; |
|
|
|
return guanzhu; |
|
|
|
} |
|
|
|
} |
|
|
|