mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-12 19:17:58 +00:00
Refact. Flutter web, mid commit (#7494)
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_hbb/main.dart';
|
||||
import 'package:flutter_hbb/common.dart';
|
||||
|
||||
enum SystemWindowTheme { light, dark }
|
||||
|
||||
@@ -19,7 +18,7 @@ class RdPlatformChannel {
|
||||
|
||||
/// Change the theme of the system window
|
||||
Future<void> changeSystemWindowTheme(SystemWindowTheme theme) {
|
||||
assert(Platform.isMacOS);
|
||||
assert(isMacOS);
|
||||
if (kDebugMode) {
|
||||
print(
|
||||
"[Window ${kWindowId ?? 'Main'}] change system window theme to ${theme.name}");
|
||||
@@ -30,7 +29,7 @@ class RdPlatformChannel {
|
||||
|
||||
/// Terminate .app manually.
|
||||
Future<void> terminate() {
|
||||
assert(Platform.isMacOS);
|
||||
assert(isMacOS);
|
||||
return _osxMethodChannel.invokeMethod("terminate");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user