flutter_desktop: remote tab menu

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2022-11-03 21:58:25 +08:00
parent c2d843ace6
commit 911436379f
9 changed files with 433 additions and 104 deletions

View File

@@ -25,7 +25,7 @@ class PlatformFFI {
static get localeName => window.navigator.language;
static Future<Null> init(String _appType) async {
static Future<void> init(String _appType) async {
isWeb = true;
isWebDesktop = !context.callMethod('isMobile');
context.callMethod('init');
@@ -57,13 +57,13 @@ class PlatformFFI {
}
static void stopDesktopWebListener() {
mouseListeners.forEach((l) {
l.cancel();
});
for (var ml in mouseListeners) {
ml.cancel();
}
mouseListeners.clear();
keyListeners.forEach((l) {
l.cancel();
});
for (var kl in keyListeners) {
kl.cancel();
}
keyListeners.clear();
}