mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-12 19:17:58 +00:00
@@ -5,12 +5,12 @@ import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import '../consts.dart';
|
||||
import './platform_model.dart';
|
||||
|
||||
enum SvcStatus { notReady, connecting, ready }
|
||||
|
||||
class StateGlobal {
|
||||
int _windowId = -1;
|
||||
bool grabKeyboard = false;
|
||||
final RxBool _fullscreen = false.obs;
|
||||
bool _isMinimized = false;
|
||||
final RxBool isMaximized = false.obs;
|
||||
@@ -22,6 +22,8 @@ class StateGlobal {
|
||||
// Only used for macOS
|
||||
bool? closeOnFullscreen;
|
||||
|
||||
String _inputSource = '';
|
||||
|
||||
// Use for desktop -> remote toolbar -> resolution
|
||||
final Map<String, Map<int, String?>> _lastResolutionGroupValues = {};
|
||||
|
||||
@@ -94,6 +96,18 @@ class StateGlobal {
|
||||
}
|
||||
}
|
||||
|
||||
String getInputSource({bool force = false}) {
|
||||
if (force || _inputSource.isEmpty) {
|
||||
_inputSource = bind.mainGetLocalOption(key: kOptionInputSource);
|
||||
}
|
||||
return _inputSource;
|
||||
}
|
||||
|
||||
void setInputSource(String v) async {
|
||||
await bind.mainSetLocalOption(key: kOptionInputSource, value: v);
|
||||
_inputSource = bind.mainGetLocalOption(key: kOptionInputSource);
|
||||
}
|
||||
|
||||
StateGlobal._();
|
||||
|
||||
static final StateGlobal instance = StateGlobal._();
|
||||
|
||||
Reference in New Issue
Block a user