add desktop cm closeAll clients

This commit is contained in:
csf 2022-08-23 21:28:44 +08:00
parent 3155d40f80
commit f4745ded23

View File

@ -18,13 +18,27 @@ class DesktopServerPage extends StatefulWidget {
}
class _DesktopServerPageState extends State<DesktopServerPage>
with AutomaticKeepAliveClientMixin {
with WindowListener, AutomaticKeepAliveClientMixin {
@override
void initState() {
gFFI.ffiModel.updateEventListener("");
windowManager.addListener(this);
super.initState();
}
@override
void dispose() {
windowManager.removeListener(this);
super.dispose();
}
@override
void onWindowClose() {
gFFI.serverModel.closeAll();
gFFI.close();
super.onWindowClose();
}
Widget build(BuildContext context) {
super.build(context);
return MultiProvider(