|
|
@@ -159,6 +159,7 @@ class _HomePageState extends State<HomePage> |
|
|
|
|
|
|
|
@override |
|
|
|
void dispose() { |
|
|
|
print(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>Homepagedispose>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"); |
|
|
|
WidgetsBinding.instance.removeObserver(this); |
|
|
|
streamSubscription.cancel(); |
|
|
|
reloadSubscription?.cancel(); |
|
|
@@ -202,13 +203,23 @@ class _HomePageState extends State<HomePage> |
|
|
|
_currentIndex = 0; |
|
|
|
} |
|
|
|
|
|
|
|
return Scaffold( |
|
|
|
body: IndexedStack( |
|
|
|
index: _currentIndex, |
|
|
|
children: contentWidgets, |
|
|
|
return WillPopScope( |
|
|
|
onWillPop: () async{ |
|
|
|
print(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>HomepageBack>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"); |
|
|
|
EventUtil.instance.fire("HomepageSignOut"); |
|
|
|
// 退出app |
|
|
|
// await SystemChannels.platform.invokeMethod('SystemNavigator.pop'); |
|
|
|
return true; |
|
|
|
|
|
|
|
}, |
|
|
|
child: Scaffold( |
|
|
|
body: IndexedStack( |
|
|
|
index: _currentIndex, |
|
|
|
children: contentWidgets, |
|
|
|
), |
|
|
|
//底部导航栏 |
|
|
|
bottomNavigationBar: createBottomNavigationBar(tabs), |
|
|
|
), |
|
|
|
//底部导航栏 |
|
|
|
bottomNavigationBar: createBottomNavigationBar(tabs), |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|