|
@@ -164,6 +164,7 @@ class _HomePageState extends State<HomePage> |
|
|
|
|
|
|
|
|
@override |
|
|
@override |
|
|
void dispose() { |
|
|
void dispose() { |
|
|
|
|
|
print(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>Homepagedispose>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"); |
|
|
WidgetsBinding.instance.removeObserver(this); |
|
|
WidgetsBinding.instance.removeObserver(this); |
|
|
streamSubscription.cancel(); |
|
|
streamSubscription.cancel(); |
|
|
reloadSubscription?.cancel(); |
|
|
reloadSubscription?.cancel(); |
|
@@ -207,13 +208,23 @@ class _HomePageState extends State<HomePage> |
|
|
_currentIndex = 0; |
|
|
_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), |
|
|
|
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|