implement functional draft version

This commit is contained in:
SoLongAndThanksForAllThePizza
2022-05-29 04:39:12 +08:00
parent f56dcc9e6c
commit e836b7fcfb
6 changed files with 385 additions and 5 deletions

View File

@@ -102,7 +102,7 @@ class PlatformFFI {
name = '${androidInfo.brand}-${androidInfo.model}';
id = androidInfo.id.hashCode.toString();
androidVersion = androidInfo.version.sdkInt;
} else {
} else if (Platform.isIOS) {
IosDeviceInfo iosInfo = await deviceInfo.iosInfo;
name = iosInfo.utsname.machine;
id = iosInfo.identifierForVendor.hashCode.toString();

View File

@@ -150,6 +150,7 @@ class ServerModel with ChangeNotifier {
}
}
/// Toggle the screen sharing service.
toggleService() async {
if (_isStart) {
final res =
@@ -198,6 +199,7 @@ class ServerModel with ChangeNotifier {
}
}
/// Start the screen sharing service.
Future<Null> startService() async {
_isStart = true;
notifyListeners();
@@ -212,6 +214,7 @@ class ServerModel with ChangeNotifier {
}
}
/// Stop the screen sharing service.
Future<Null> stopService() async {
_isStart = false;
FFI.serverModel.closeAll();