mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 23:34:24 +01:00
opt.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user