flutter_desktop: adjust window

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2022-10-08 17:27:30 +08:00
parent 1719b4735d
commit 03439831a7
6 changed files with 112 additions and 21 deletions

View File

@@ -179,3 +179,25 @@ class RemoteCursorMovedState {
static RxBool find(String id) => Get.find<RxBool>(tag: tag(id));
}
class RemoteCountState {
static String tag() => 'remote_count_';
static void init() {
final key = tag();
if (!Get.isRegistered(tag: key)) {
// Server side, default true
final RxInt state = 1.obs;
Get.put(state, tag: key);
}
}
static void delete() {
final key = tag();
if (Get.isRegistered(tag: key)) {
Get.delete(tag: key);
}
}
static RxInt find() => Get.find<RxInt>(tag: tag());
}