This commit is contained in:
lollipopkit🏳️‍⚧️
2024-09-21 23:12:15 +08:00
parent c062c12a0e
commit eab06abcaf
23 changed files with 180 additions and 66 deletions

View File

@@ -31,6 +31,18 @@ class _HomePageState extends State<HomePage>
bool _switchingPage = false;
bool _shouldAuth = false;
@override
void dispose() {
super.dispose();
WidgetsBinding.instance.removeObserver(this);
ServerProvider.closeServer();
_pageController.dispose();
WakelockPlus.disable();
_selectIndex.dispose();
_isLandscape.dispose();
}
@override
void initState() {
super.initState();
@@ -53,15 +65,6 @@ class _HomePageState extends State<HomePage>
MediaQuery.of(context).orientation == Orientation.landscape;
}
@override
void dispose() {
super.dispose();
WidgetsBinding.instance.removeObserver(this);
ServerProvider.closeServer();
_pageController.dispose();
WakelockPlus.disable();
}
@override
void didChangeAppLifecycleState(AppLifecycleState state) {
super.didChangeAppLifecycleState(state);