mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-08-19 21:17:55 +08:00
demo: use mobile_ffi to get id for desktop version
This commit is contained in:
@ -1,7 +1,10 @@
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:wakelock/wakelock.dart';
|
||||
|
||||
import '../common.dart';
|
||||
import '../mobile/pages/server_page.dart';
|
||||
import 'model.dart';
|
||||
@ -203,7 +206,10 @@ class ServerModel with ChangeNotifier {
|
||||
FFI.setByName("start_service");
|
||||
getIDPasswd();
|
||||
updateClientState();
|
||||
Wakelock.enable();
|
||||
if (!Platform.isLinux) {
|
||||
// current linux is not supported
|
||||
Wakelock.enable();
|
||||
}
|
||||
}
|
||||
|
||||
Future<Null> stopService() async {
|
||||
@ -212,7 +218,10 @@ class ServerModel with ChangeNotifier {
|
||||
await FFI.invokeMethod("stop_service");
|
||||
FFI.setByName("stop_service");
|
||||
notifyListeners();
|
||||
Wakelock.disable();
|
||||
if (!Platform.isLinux) {
|
||||
// current linux is not supported
|
||||
Wakelock.disable();
|
||||
}
|
||||
}
|
||||
|
||||
Future<Null> initInput() async {
|
||||
|
Reference in New Issue
Block a user