await ffi init

This commit is contained in:
rustdesk
2022-04-17 00:44:05 +08:00
parent d6eee37fbb
commit 7177a566ae
4 changed files with 53 additions and 45 deletions

View File

@@ -22,7 +22,6 @@ class FfiModel with ChangeNotifier {
Display _display = Display();
var _decoding = false;
bool _waitForImage = false;
bool _initialized = false;
var _inputBlocked = false;
final _permissions = Map<String, bool>();
bool? _secure;
@@ -32,8 +31,6 @@ class FfiModel with ChangeNotifier {
get permissions => _permissions;
get initialized => _initialized;
get display => _display;
get secure => _secure;
@@ -51,12 +48,10 @@ class FfiModel with ChangeNotifier {
FfiModel() {
Translator.call = translate;
clear();
() async {
await PlatformFFI.init();
_initialized = true;
print("FFI initialized");
notifyListeners();
}();
}
Future<void> init() async {
await PlatformFFI.init();
}
void updatePermission(Map<String, dynamic> evt) {