Skip to content

An open-source remote desktop application designed for self-hosting, as an alternative to TeamViewer.

Refact. Build flutter web (#7472)

fufesou95589740805d
diff --git a/flutter/.gitignore b/flutter/.gitignore
index 9c7e52c12..ee7e42c6c 100644
--- a/flutter/.gitignore
+++ b/flutter/.gitignore
@@ -32,7 +32,6 @@
/build/
# Web related
-lib/generated_plugin_registrant.dart
# Symbolication related
app.*.symbols
diff --git a/flutter/lib/common.dart b/flutter/lib/common.dart
index a031d45d6..611cdecb3 100644
--- a/flutter/lib/common.dart
+++ b/flutter/lib/common.dart
@@ -1,12 +1,10 @@
import 'dart:async';
import 'dart:convert';
-import 'dart:ffi' hide Size;
import 'dart:io';
import 'dart:math';
import 'package:back_button_interceptor/back_button_interceptor.dart';
import 'package:desktop_multi_window/desktop_multi_window.dart';
-import 'package:ffi/ffi.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
@@ -25,7 +23,6 @@ import 'package:get/get.dart';
import 'package:uni_links/uni_links.dart';
import 'package:url_launcher/url_launcher.dart';
import 'package:uuid/uuid.dart';
-import 'package:win32/win32.dart' as win32;
import 'package:window_manager/window_manager.dart';
import 'package:window_size/window_size.dart' as window_size;
@@ -37,16 +34,24 @@ import 'models/input_model.dart';
import 'models/model.dart';
import 'models/platform_model.dart';
+import 'package:flutter_hbb/native/win32.dart'
+ if (dart.library.html) 'package:flutter_hbb/web/win32.dart';
+import 'package:flutter_hbb/native/common.dart'
+ if (dart.library.html) 'package:flutter_hbb/web/common.dart';
+
final globalKey = GlobalKey<NavigatorState>();
final navigationBarKey = GlobalKey();
-final isAndroid = Platform.isAndroid;
-final isIOS = Platform.isIOS;
-final isDesktop = Platform.isWindows || Platform.isMacOS || Platform.isLinux;
-var isWeb = false;
+final isAndroid = isAndroid_;
+final isIOS = isIOS_;
+final isWindows = isWindows_;
+final isMacOS = isMacOS_;
+final isLinux = isLinux_;
+final isDesktop = isDesktop_;
+final isWeb = isWeb_;
var isWebDesktop = false;
var isMobile = isAndroid || isIOS;
-var version = "";
+var version = '';
int androidVersion = 0;
/// only available for Windows target
@@ -2317,35 +2322,7 @@ WindowsTarget getWindowsTarget(int buildNumber) {
/// [Note]
/// Please use this function wrapped with `Platform.isWindows`.
int getWindowsTargetBuildNumber() {
- final rtlGetVersion = DynamicLibrary.open('ntdll.dll').lookupFunction<
- Void Function(Pointer<win32.OSVERSIONINFOEX>),
- void Function(Pointer<win32.OSVERSIONINFOEX>)>('RtlGetVersion');
- final osVersionInfo = getOSVERSIONINFOEXPointer();
- rtlGetVersion(osVersionInfo);
- int buildNumber = osVersionInfo.ref.dwBuildNumber;
- calloc.free(osVersionInfo);
- return buildNumber;
-}
-
-/// Get Windows OS version pointer
-///
-/// [Note]
-/// Please use this function wrapped with `Platform.isWindows`.
-Pointer<win32.OSVERSIONINFOEX> getOSVERSIONINFOEXPointer() {
- final pointer = calloc<win32.OSVERSIONINFOEX>();
- pointer.ref
- ..dwOSVersionInfoSize = sizeOf<win32.OSVERSIONINFOEX>()
- ..dwBuildNumber = 0
- ..dwMajorVersion = 0
- ..dwMinorVersion = 0
- ..dwPlatformId = 0
- ..szCSDVersion = ''
- ..wServicePackMajor = 0
- ..wServicePackMinor = 0
- ..wSuiteMask = 0
- ..wProductType = 0
- ..wReserved = 0;
- return pointer;
+ return getWindowsTargetBuildNumber_();
}
/// Indicating we need to use compatible ui mode.
diff --git a/flutter/lib/main.dart b/flutter/lib/main.dart
index dc2d97a47..e1632184e 100644
--- a/flutter/lib/main.dart
+++ b/flutter/lib/main.dart
@@ -14,21 +14,21 @@ import 'package:flutter_hbb/desktop/screen/desktop_port_forward_screen.dart';
import 'package:flutter_hbb/desktop/screen/desktop_remote_screen.dart';
import 'package:flutter_hbb/desktop/widgets/refresh_wrapper.dart';
import 'package:flutter_hbb/models/state_model.dart';
-import 'package:flutter_hbb/plugin/handlers.dart';
import 'package:flutter_hbb/utils/multi_window_manager.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:get/get.dart';
import 'package:provider/provider.dart';
import 'package:window_manager/window_manager.dart';
-// import 'package:window_manager/window_manager.dart';
-
import 'common.dart';
import 'consts.dart';
import 'mobile/pages/home_page.dart';
import 'mobile/pages/server_page.dart';
import 'models/platform_model.dart';
+import 'package:flutter_hbb/plugin/handlers.dart'
+ if (dart.library.html) 'package:flutter_hbb/web/plugin/handlers.dart';
+
/// Basic window and launch properties.
int? kWindowId;
WindowType? kWindowType;
@@ -36,6 +36,7 @@ late List<String> kBootArgs;
Future<void> main(List<String> args) async {
WidgetsFlutterBinding.ensureInitialized();
+
debugPrint("launch args: $args");
kBootArgs = List.from(args);
diff --git a/flutter/lib/models/desktop_render_texture.dart b/flutter/lib/models/desktop_render_texture.dart
index a54042f06..e56ba5e16 100644
--- a/flutter/lib/models/desktop_render_texture.dart
+++ b/flutter/lib/models/desktop_render_texture.dart
@@ -3,11 +3,13 @@ import 'package:flutter_gpu_texture_renderer/flutter_gpu_texture_renderer.dart';
import 'package:flutter_hbb/consts.dart';
import 'package:flutter_hbb/models/model.dart';
import 'package:get/get.dart';
-import 'package:texture_rgba_renderer/texture_rgba_renderer.dart';
import '../../common.dart';
import './platform_model.dart';
+import 'package:texture_rgba_renderer/texture_rgba_renderer.dart'
+ if (dart.library.html) 'package:flutter_hbb/web/texture_rgba_renderer.dart';
+
// Feature flutter_texture_render need to be enabled if feature gpucodec is enabled.
final useTextureRender =
bind.mainHasPixelbufferTextureRender() || bind.mainHasGpuTextureRender();
diff --git a/flutter/lib/models/model.dart b/flutter/lib/models/model.dart
index fee48765f..1e3136e94 100644
--- a/flutter/lib/models/model.dart
+++ b/flutter/lib/models/model.dart
@@ -9,7 +9,6 @@ import 'package:desktop_multi_window/desktop_multi_window.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_hbb/consts.dart';
-import 'package:flutter_hbb/generated_bridge.dart';
import 'package:flutter_hbb/models/ab_model.dart';
import 'package:flutter_hbb/models/chat_model.dart';
import 'package:flutter_hbb/models/cm_file_model.dart';
@@ -39,6 +38,9 @@ import '../common/widgets/dialog.dart';
import 'input_model.dart';
import 'platform_model.dart';
+import 'package:flutter_hbb/generated_bridge.dart'
+ if (dart.library.html) 'package:flutter_hbb/web/bridge.dart';
+
typedef HandleMsgBox = Function(Map<String, dynamic> evt, String id);
typedef ReconnectHandle = Function(OverlayDialogManager, SessionID, bool);
final _constSessionId = Uuid().v4obj();
diff --git a/flutter/lib/models/platform_model.dart b/flutter/lib/models/platform_model.dart
index d2b8fa765..6bc770ff6 100644
--- a/flutter/lib/models/platform_model.dart
+++ b/flutter/lib/models/platform_model.dart
@@ -1,5 +1,6 @@
-import 'package:flutter_hbb/generated_bridge.dart';
import 'native_model.dart' if (dart.library.html) 'web_model.dart';
+import 'package:flutter_hbb/generated_bridge.dart'
+ if (dart.library.html) 'package:flutter_hbb/web/bridge.dart';
final platformFFI = PlatformFFI.instance;
final localeName = PlatformFFI.localeName;
diff --git a/flutter/lib/models/web_model.dart b/flutter/lib/models/web_model.dart
index 3c7de06c2..d8c8491c9 100644
--- a/flutter/lib/models/web_model.dart
+++ b/flutter/lib/models/web_model.dart
@@ -3,15 +3,23 @@
import 'dart:convert';
import 'dart:typed_data';
import 'dart:js';
-
-import '../common.dart';
import 'dart:html';
import 'dart:async';
+import 'package:flutter/foundation.dart';
+
+import 'package:flutter_hbb/web/bridge.dart';
+import 'package:flutter_hbb/common.dart';
+
final List<StreamSubscription<MouseEvent>> mouseListeners = [];
final List<StreamSubscription<KeyboardEvent>> keyListeners = [];
+typedef HandleEvent = Future<void> Function(Map<String, dynamic> evt);
+
class PlatformFFI {
+ final _eventHandlers = <String, Map<String, HandleEvent>>{};
+ late RustdeskImpl _ffiBind;
+
static String getByName(String name, [String arg = '']) {
return context.callMethod('getByName', [name, arg]);
}
@@ -24,15 +32,78 @@ class PlatformFFI {
static final PlatformFFI instance = PlatformFFI._();
static get localeName => window.navigator.language;
+ RustdeskImpl get ffiBind => _ffiBind;
+
+ static Future<String> getVersion() async {
+ throw UnimplementedError();
+ }
+
+ bool registerEventHandler(
+ String eventName, String handlerName, HandleEvent handler) {
+ debugPrint('registerEventHandler $eventName $handlerName');
+ var handlers = _eventHandlers[eventName];
+ if (handlers == null) {
+ _eventHandlers[eventName] = {handlerName: handler};
+ return true;
+ } else {
+ if (handlers.containsKey(handlerName)) {
+ return false;
+ } else {
+ handlers[handlerName] = handler;
+ return true;
+ }
+ }
+ }
+
+ void unregisterEventHandler(String eventName, String handlerName) {
+ debugPrint('unregisterEventHandler $eventName $handlerName');
+ var handlers = _eventHandlers[eventName];
+ if (handlers != null) {
+ handlers.remove(handlerName);
+ }
+ }
+
+ Future<bool> tryHandle(Map<String, dynamic> evt) async {
+ final name = evt['name'];
+ if (name != null) {
+ final handlers = _eventHandlers[name];
+ if (handlers != null) {
+ if (handlers.isNotEmpty) {
+ for (var handler in handlers.values) {
+ await handler(evt);
+ }
+ return true;
+ }
+ }
+ }
+ return false;
+ }
- static Future<void> init(String appType) async {
- isWeb = true;
+ String translate(String name, String locale) =>
+ _ffiBind.translate(name: name, locale: locale);
+
+ Uint8List? getRgba(SessionID sessionId, int display, int bufSize) {
+ throw UnimplementedError();
+ }
+
+ int getRgbaSize(SessionID sessionId, int display) =>
+ _ffiBind.sessionGetRgbaSize(sessionId: sessionId, display: display);
+ void nextRgba(SessionID sessionId, int display) =>
+ _ffiBind.sessionNextRgba(sessionId: sessionId, display: display);
+ void registerPixelbufferTexture(SessionID sessionId, int display, int ptr) =>
+ _ffiBind.sessionRegisterPixelbufferTexture(
+ sessionId: sessionId, display: display, ptr: ptr);
+ void registerGpuTexture(SessionID sessionId, int display, int ptr) =>
+ _ffiBind.sessionRegisterGpuTexture(
+ sessionId: sessionId, display: display, ptr: ptr);
+
+ Future<void> init(String appType) async {
isWebDesktop = !context.callMethod('isMobile');
context.callMethod('init');
version = getByName('version');
}
- static void setEventCallback(void Function(Map<String, dynamic>) fun) {
+ void setEventCallback(void Function(Map<String, dynamic>) fun) {
context["onGlobalEvent"] = (String message) {
try {
Map<String, dynamic> event = json.decode(message);
@@ -43,7 +114,7 @@ class PlatformFFI {
};
}
- static void setRgbaCallback(void Function(Uint8List) fun) {
+ void setRgbaCallback(void Function(Uint8List) fun) {
context["onRgba"] = (Uint8List? rgba) {
if (rgba != null) {
fun(rgba);
@@ -51,12 +122,12 @@ class PlatformFFI {
};
}
- static void startDesktopWebListener() {
+ void startDesktopWebListener() {
mouseListeners.add(
window.document.onContextMenu.listen((evt) => evt.preventDefault()));
}
- static void stopDesktopWebListener() {
+ void stopDesktopWebListener() {
for (var ml in mouseListeners) {
ml.cancel();
}
@@ -67,9 +138,14 @@ class PlatformFFI {
keyListeners.clear();
}
- static void setMethodCallHandler(FMethod callback) {}
+ void setMethodCallHandler(FMethod callback) {}
- static Future<bool> invokeMethod(String method, [dynamic arguments]) async {
+ invokeMethod(String method, [dynamic arguments]) async {
return true;
}
+
+ // just for compilation
+ void syncAndroidServiceAppDirConfigPath() {
+ throw UnimplementedError();
+ }
}
diff --git a/flutter/lib/native/common.dart b/flutter/lib/native/common.dart
new file mode 100644
index 000000000..3ab8b786e
--- /dev/null
+++ b/flutter/lib/native/common.dart
@@ -0,0 +1,10 @@
+import 'dart:io';
+
+final isAndroid_ = Platform.isAndroid;
+final isIOS_ = Platform.isIOS;
+final isWindows_ = Platform.isWindows;
+final isMacOS_ = Platform.isWindows;
+final isLinux_ = Platform.isWindows;
+final isWeb_ = false;
+
+final isDesktop_ = Platform.isWindows || Platform.isMacOS || Platform.isLinux;
diff --git a/flutter/lib/native/win32.dart b/flutter/lib/native/win32.dart
new file mode 100644
index 000000000..29f37339b
--- /dev/null
+++ b/flutter/lib/native/win32.dart
@@ -0,0 +1,41 @@
+import 'dart:ffi' hide Size;
+
+import 'package:ffi/ffi.dart';
+
+import 'package:win32/win32.dart' as win32;
+
+/// Get windows target build number.
+///
+/// [Note]
+/// Please use this function wrapped with `Platform.isWindows`.
+int getWindowsTargetBuildNumber_() {
+ final rtlGetVersion = DynamicLibrary.open('ntdll.dll').lookupFunction<
+ Void Function(Pointer<win32.OSVERSIONINFOEX>),
+ void Function(Pointer<win32.OSVERSIONINFOEX>)>('RtlGetVersion');
+ final osVersionInfo = _getOSVERSIONINFOEXPointer();
+ rtlGetVersion(osVersionInfo);
+ int buildNumber = osVersionInfo.ref.dwBuildNumber;
+ calloc.free(osVersionInfo);
+ return buildNumber;
+}
+
+/// Get Windows OS version pointer
+///
+/// [Note]
+/// Please use this function wrapped with `Platform.isWindows`.
+Pointer<win32.OSVERSIONINFOEX> _getOSVERSIONINFOEXPointer() {
+ final pointer = calloc<win32.OSVERSIONINFOEX>();
+ pointer.ref
+ ..dwOSVersionInfoSize = sizeOf<win32.OSVERSIONINFOEX>()
+ ..dwBuildNumber = 0
+ ..dwMajorVersion = 0
+ ..dwMinorVersion = 0
+ ..dwPlatformId = 0
+ ..szCSDVersion = ''
+ ..wServicePackMajor = 0
+ ..wServicePackMinor = 0
+ ..wSuiteMask = 0
+ ..wProductType = 0
+ ..wReserved = 0;
+ return pointer;
+}
diff --git a/flutter/lib/web/bridge.dart b/flutter/lib/web/bridge.dart
new file mode 100644
index 000000000..8c55c1d7e
--- /dev/null
+++ b/flutter/lib/web/bridge.dart
@@ -0,0 +1,1414 @@
+import 'dart:async';
+import 'dart:typed_data';
+import 'package:uuid/uuid.dart';
+
+final _privateConstructorUsedError = UnsupportedError(
+ 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
+
+mixin _$EventToUI {
+ Object get field0 => throw _privateConstructorUsedError;
+}
+
+sealed class EventToUI {
+ const factory EventToUI.event(
+ String field0,
+ ) = EventToUI_Event;
+ const factory EventToUI.rgba(
+ int field0,
+ ) = EventToUI_Rgba;
+ const factory EventToUI.texture(
+ int field0,
+ ) = EventToUI_Texture;
+}
+
+class EventToUI_Event implements EventToUI {
+ const EventToUI_Event(final String field0) : this.field = field0;
+ final String field;
+ String get field0 => field;
+}
+
+class EventToUI_Rgba implements EventToUI {
+ const EventToUI_Rgba(final int field0) : this.field = field0;
+ final int field;
+ int get field0 => field;
+}
+
+class EventToUI_Texture implements EventToUI {
+ const EventToUI_Texture(final int field0) : this.field = field0;
+ final int field;
+ int get field0 => field;
+}
+
+class RustdeskImpl {
+ Future<void> stopGlobalEventStream({required String appType, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> hostStopSystemKeyPropagate(
+ {required bool stopped, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ int peerGetDefaultSessionsCount({required String id, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ String sessionAddExistedSync(
+ {required String id, required UuidValue sessionId, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ void sessionTryAddDisplay(
+ {required UuidValue sessionId,
+ required Int32List displays,
+ dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ String sessionAddSync(
+ {required UuidValue sessionId,
+ required String id,
+ required bool isFileTransfer,
+ required bool isPortForward,
+ required bool isRdp,
+ required String switchUuid,
+ required bool forceRelay,
+ required String password,
+ required bool isSharedPassword,
+ dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Stream<EventToUI> sessionStart(
+ {required UuidValue sessionId, required String id, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<bool?> sessionGetRemember(
+ {required UuidValue sessionId, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<bool?> sessionGetToggleOption(
+ {required UuidValue sessionId, required String arg, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ bool sessionGetToggleOptionSync(
+ {required UuidValue sessionId, required String arg, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<String?> sessionGetOption(
+ {required UuidValue sessionId, required String arg, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> sessionLogin(
+ {required UuidValue sessionId,
+ required String osUsername,
+ required String osPassword,
+ required String password,
+ required bool remember,
+ dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> sessionSend2Fa(
+ {required UuidValue sessionId, required String code, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> sessionClose({required UuidValue sessionId, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> sessionRefresh(
+ {required UuidValue sessionId, required int display, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> sessionRecordScreen(
+ {required UuidValue sessionId,
+ required bool start,
+ required int display,
+ required int width,
+ required int height,
+ dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> sessionRecordStatus(
+ {required UuidValue sessionId, required bool status, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> sessionReconnect(
+ {required UuidValue sessionId, required bool forceRelay, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> sessionToggleOption(
+ {required UuidValue sessionId, required String value, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> sessionTogglePrivacyMode(
+ {required UuidValue sessionId,
+ required String implKey,
+ required bool on,
+ dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<String?> sessionGetFlutterOption(
+ {required UuidValue sessionId, required String k, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> sessionSetFlutterOption(
+ {required UuidValue sessionId,
+ required String k,
+ required String v,
+ dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<String?> sessionGetFlutterOptionByPeerId(
+ {required String id, required String k, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ int getNextTextureKey({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ String getLocalFlutterOption({required String k, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> setLocalFlutterOption(
+ {required String k, required String v, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ String getLocalKbLayoutType({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> setLocalKbLayoutType(
+ {required String kbLayoutType, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<String?> sessionGetViewStyle(
+ {required UuidValue sessionId, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> sessionSetViewStyle(
+ {required UuidValue sessionId, required String value, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<String?> sessionGetScrollStyle(
+ {required UuidValue sessionId, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> sessionSetScrollStyle(
+ {required UuidValue sessionId, required String value, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<String?> sessionGetImageQuality(
+ {required UuidValue sessionId, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> sessionSetImageQuality(
+ {required UuidValue sessionId, required String value, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<String?> sessionGetKeyboardMode(
+ {required UuidValue sessionId, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> sessionSetKeyboardMode(
+ {required UuidValue sessionId, required String value, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ String? sessionGetReverseMouseWheelSync(
+ {required UuidValue sessionId, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> sessionSetReverseMouseWheel(
+ {required UuidValue sessionId, required String value, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ String? sessionGetDisplaysAsIndividualWindows(
+ {required UuidValue sessionId, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> sessionSetDisplaysAsIndividualWindows(
+ {required UuidValue sessionId, required String value, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ String? sessionGetUseAllMyDisplaysForTheRemoteSession(
+ {required UuidValue sessionId, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> sessionSetUseAllMyDisplaysForTheRemoteSession(
+ {required UuidValue sessionId, required String value, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<Int32List?> sessionGetCustomImageQuality(
+ {required UuidValue sessionId, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ bool sessionIsKeyboardModeSupported(
+ {required UuidValue sessionId, required String mode, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> sessionSetCustomImageQuality(
+ {required UuidValue sessionId, required int value, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> sessionSetCustomFps(
+ {required UuidValue sessionId, required int fps, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> sessionLockScreen({required UuidValue sessionId, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> sessionCtrlAltDel({required UuidValue sessionId, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> sessionSwitchDisplay(
+ {required bool isDesktop,
+ required UuidValue sessionId,
+ required Int32List value,
+ dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> sessionHandleFlutterKeyEvent(
+ {required UuidValue sessionId,
+ required String name,
+ required int platformCode,
+ required int positionCode,
+ required int lockModes,
+ required bool downOrUp,
+ dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ void sessionEnterOrLeave(
+ {required UuidValue sessionId, required bool enter, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> sessionInputKey(
+ {required UuidValue sessionId,
+ required String name,
+ required bool down,
+ required bool press,
+ required bool alt,
+ required bool ctrl,
+ required bool shift,
+ required bool command,
+ dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> sessionInputString(
+ {required UuidValue sessionId, required String value, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> sessionSendChat(
+ {required UuidValue sessionId, required String text, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> sessionPeerOption(
+ {required UuidValue sessionId,
+ required String name,
+ required String value,
+ dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<String> sessionGetPeerOption(
+ {required UuidValue sessionId, required String name, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> sessionInputOsPassword(
+ {required UuidValue sessionId, required String value, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> sessionReadRemoteDir(
+ {required UuidValue sessionId,
+ required String path,
+ required bool includeHidden,
+ dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> sessionSendFiles(
+ {required UuidValue sessionId,
+ required int actId,
+ required String path,
+ required String to,
+ required int fileNum,
+ required bool includeHidden,
+ required bool isRemote,
+ dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> sessionSetConfirmOverrideFile(
+ {required UuidValue sessionId,
+ required int actId,
+ required int fileNum,
+ required bool needOverride,
+ required bool remember,
+ required bool isUpload,
+ dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> sessionRemoveFile(
+ {required UuidValue sessionId,
+ required int actId,
+ required String path,
+ required int fileNum,
+ required bool isRemote,
+ dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> sessionReadDirRecursive(
+ {required UuidValue sessionId,
+ required int actId,
+ required String path,
+ required bool isRemote,
+ required bool showHidden,
+ dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> sessionRemoveAllEmptyDirs(
+ {required UuidValue sessionId,
+ required int actId,
+ required String path,
+ required bool isRemote,
+ dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> sessionCancelJob(
+ {required UuidValue sessionId, required int actId, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> sessionCreateDir(
+ {required UuidValue sessionId,
+ required int actId,
+ required String path,
+ required bool isRemote,
+ dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<String> sessionReadLocalDirSync(
+ {required UuidValue sessionId,
+ required String path,
+ required bool showHidden,
+ dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<String> sessionGetPlatform(
+ {required UuidValue sessionId, required bool isRemote, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> sessionLoadLastTransferJobs(
+ {required UuidValue sessionId, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> sessionAddJob(
+ {required UuidValue sessionId,
+ required int actId,
+ required String path,
+ required String to,
+ required int fileNum,
+ required bool includeHidden,
+ required bool isRemote,
+ dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> sessionResumeJob(
+ {required UuidValue sessionId,
+ required int actId,
+ required bool isRemote,
+ dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> sessionElevateDirect(
+ {required UuidValue sessionId, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> sessionElevateWithLogon(
+ {required UuidValue sessionId,
+ required String username,
+ required String password,
+ dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> sessionSwitchSides(
+ {required UuidValue sessionId, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> sessionChangeResolution(
+ {required UuidValue sessionId,
+ required int display,
+ required int width,
+ required int height,
+ dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> sessionSetSize(
+ {required UuidValue sessionId,
+ required int display,
+ required int width,
+ required int height,
+ dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> sessionSendSelectedSessionId(
+ {required UuidValue sessionId, required String sid, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<List<String>> mainGetSoundInputs({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<String?> mainGetDefaultSoundInput({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ String mainGetLoginDeviceInfo({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> mainChangeId({required String newId, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<String> mainGetAsyncStatus({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<String> mainGetOption({required String key, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ String mainGetOptionSync({required String key, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<String> mainGetError({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ bool mainShowOption({required String key, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> mainSetOption(
+ {required String key, required String value, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<String> mainGetOptions({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ String mainGetOptionsSync({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> mainSetOptions({required String json, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<String> mainTestIfValidServer({required String server, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> mainSetSocks(
+ {required String proxy,
+ required String username,
+ required String password,
+ dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<List<String>> mainGetSocks({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<String> mainGetAppName({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ String mainGetAppNameSync({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ String mainUriPrefixSync({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<String> mainGetLicense({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<String> mainGetVersion({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<List<String>> mainGetFav({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> mainStoreFav({required List<String> favs, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ String mainGetPeerSync({required String id, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<String> mainGetLanPeers({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<String> mainGetConnectStatus({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> mainCheckConnectStatus({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<bool> mainIsUsingPublicServer({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> mainDiscover({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<String> mainGetApiServer({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> mainPostRequest(
+ {required String url,
+ required String body,
+ required String header,
+ dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ String mainGetLocalOption({required String key, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ String mainGetEnv({required String key, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> mainSetLocalOption(
+ {required String key, required String value, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ String mainGetInputSource({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> mainSetInputSource(
+ {required UuidValue sessionId, required String value, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<String> mainGetMyId({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<String> mainGetUuid({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<String> mainGetPeerOption(
+ {required String id, required String key, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ String mainGetPeerOptionSync(
+ {required String id, required String key, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ String mainGetPeerFlutterOptionSync(
+ {required String id, required String k, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ void mainSetPeerFlutterOptionSync(
+ {required String id,
+ required String k,
+ required String v,
+ dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> mainSetPeerOption(
+ {required String id,
+ required String key,
+ required String value,
+ dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ bool mainSetPeerOptionSync(
+ {required String id,
+ required String key,
+ required String value,
+ dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> mainSetPeerAlias(
+ {required String id, required String alias, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<String> mainGetNewStoredPeers({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> mainForgetPassword({required String id, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<bool> mainPeerHasPassword({required String id, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<bool> mainPeerExists({required String id, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> mainLoadRecentPeers({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ String mainLoadRecentPeersSync({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ String mainLoadLanPeersSync({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<String> mainLoadRecentPeersForAb(
+ {required String filter, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> mainLoadFavPeers({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> mainLoadLanPeers({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> mainRemoveDiscovered({required String id, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> mainChangeTheme({required String dark, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> mainChangeLanguage({required String lang, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<String> mainDefaultVideoSaveDirectory({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> mainSetUserDefaultOption(
+ {required String key, required String value, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ String mainGetUserDefaultOption({required String key, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<String> mainHandleRelayId({required String id, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ String mainGetMainDisplay({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ String mainGetDisplays({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> sessionAddPortForward(
+ {required UuidValue sessionId,
+ required int localPort,
+ required String remoteHost,
+ required int remotePort,
+ dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> sessionRemovePortForward(
+ {required UuidValue sessionId, required int localPort, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> sessionNewRdp({required UuidValue sessionId, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> sessionRequestVoiceCall(
+ {required UuidValue sessionId, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> sessionCloseVoiceCall(
+ {required UuidValue sessionId, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> cmHandleIncomingVoiceCall(
+ {required int id, required bool accept, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> cmCloseVoiceCall({required int id, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<String> mainGetLastRemoteId({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<String> mainGetSoftwareUpdateUrl({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<String> mainGetHomeDir({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<String> mainGetLangs({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<String> mainGetTemporaryPassword({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<String> mainGetPermanentPassword({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<String> mainGetFingerprint({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<String> cmGetClientsState({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<String?> cmCheckClientsLength({required int length, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<int> cmGetClientsLength({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> mainInit({required String appDir, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> mainDeviceId({required String id, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> mainDeviceName({required String name, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> mainRemovePeer({required String id, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ bool mainHasHwcodec({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ bool mainHasGpucodec({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ String mainSupportedHwdecodings({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<bool> mainIsRoot({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ int getDoubleClickTime({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> mainStartDbusServer({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> mainSaveAb({required String json, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> mainClearAb({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<String> mainLoadAb({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> mainSaveGroup({required String json, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> mainClearGroup({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<String> mainLoadGroup({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> sessionSendPointer(
+ {required UuidValue sessionId, required String msg, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> sessionSendMouse(
+ {required UuidValue sessionId, required String msg, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> sessionRestartRemoteDevice(
+ {required UuidValue sessionId, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ String sessionGetAuditServerSync(
+ {required UuidValue sessionId, required String typ, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> sessionSendNote(
+ {required UuidValue sessionId, required String note, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<String> sessionAlternativeCodecs(
+ {required UuidValue sessionId, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> sessionChangePreferCodec(
+ {required UuidValue sessionId, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> sessionOnWaitingForImageDialogShow(
+ {required UuidValue sessionId, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> sessionToggleVirtualDisplay(
+ {required UuidValue sessionId,
+ required int index,
+ required bool on,
+ dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> mainSetHomeDir({required String home, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ String mainGetDataDirIos({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> mainStopService({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> mainStartService({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> mainUpdateTemporaryPassword({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> mainSetPermanentPassword(
+ {required String password, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<bool> mainCheckSuperUserPermission({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> mainCheckMouseTime({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<double> mainGetMouseTime({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> mainWol({required String id, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> mainCreateShortcut({required String id, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> cmSendChat(
+ {required int connId, required String msg, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> cmLoginRes(
+ {required int connId, required bool res, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> cmCloseConnection({required int connId, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> cmRemoveDisconnectedConnection(
+ {required int connId, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> cmCheckClickTime({required int connId, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<double> cmGetClickTime({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> cmSwitchPermission(
+ {required int connId,
+ required String name,
+ required bool enabled,
+ dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ bool cmCanElevate({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> cmElevatePortable({required int connId, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> cmSwitchBack({required int connId, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<String> cmGetConfig({required String name, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<String> mainGetBuildDate({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ String translate(
+ {required String name, required String locale, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ int sessionGetRgbaSize(
+ {required UuidValue sessionId, required int display, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ void sessionNextRgba(
+ {required UuidValue sessionId, required int display, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ void sessionRegisterPixelbufferTexture(
+ {required UuidValue sessionId,
+ required int display,
+ required int ptr,
+ dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ void sessionRegisterGpuTexture(
+ {required UuidValue sessionId,
+ required int display,
+ required int ptr,
+ dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> queryOnlines({required List<String> ids, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ int versionToNumber({required String v, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<bool> optionSynced({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ bool mainIsInstalled({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ void mainInitInputSource({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ bool mainIsInstalledLowerVersion({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ bool mainIsInstalledDaemon({required bool prompt, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ bool mainIsProcessTrusted({required bool prompt, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ bool mainIsCanScreenRecording({required bool prompt, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ bool mainIsCanInputMonitoring({required bool prompt, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ bool mainIsShareRdp({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> mainSetShareRdp({required bool enable, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ bool mainGotoInstall({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ String mainGetNewVersion({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ bool mainUpdateMe({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> setCurSessionId({required UuidValue sessionId, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ bool installShowRunWithoutInstall({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> installRunWithoutInstall({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> installInstallMe(
+ {required String options, required String path, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ String installInstallPath({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> mainAccountAuth(
+ {required String op, required bool rememberMe, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> mainAccountAuthCancel({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<String> mainAccountAuthResult({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> mainOnMainWindowClose({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ bool mainCurrentIsWayland({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ bool mainIsLoginWayland({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> mainStartPa({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ bool mainHideDocker({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ bool mainHasPixelbufferTextureRender({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ bool mainHasFileClipboard({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ bool mainHasGpuTextureRender({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> cmInit({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> mainStartIpcUrlServer({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> mainTestWallpaper({required int second, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<bool> mainSupportRemoveWallpaper({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ bool isIncomingOnly({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ bool isOutgoingOnly({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ bool isCustomClient({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ bool isDisableSettings({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ bool isDisableAb({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ bool isDisableAccount({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ bool isDisableInstallation({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<bool> isPresetPassword({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> sendUrlScheme({required String url, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> pluginEvent(
+ {required String id,
+ required String peer,
+ required Uint8List event,
+ dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Stream<EventToUI> pluginRegisterEventStream(
+ {required String id, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ String? pluginGetSessionOption(
+ {required String id,
+ required String peer,
+ required String key,
+ dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> pluginSetSessionOption(
+ {required String id,
+ required String peer,
+ required String key,
+ required String value,
+ dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ String? pluginGetSharedOption(
+ {required String id, required String key, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> pluginSetSharedOption(
+ {required String id,
+ required String key,
+ required String value,
+ dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> pluginReload({required String id, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ void pluginEnable({required String id, required bool v, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ bool pluginIsEnabled({required String id, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ bool pluginFeatureIsEnabled({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> pluginSyncUi({required String syncTo, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> pluginListReload({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<void> pluginInstall(
+ {required String id, required bool b, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ bool isSupportMultiUiSession({required String version, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ bool isSelinuxEnforcing({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ String mainDefaultPrivacyModeImpl({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ String mainSupportedPrivacyModeImpls({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ String mainSupportedInputSource({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<String> mainGenerate2Fa({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ Future<bool> mainVerify2Fa({required String code, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ bool mainHasValid2FaSync({dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ String mainGetHardOption({required String key, dynamic hint}) {
+ throw UnimplementedError();
+ }
+
+ void dispose() {
+ throw UnimplementedError();
+ }
+}
diff --git a/flutter/lib/web/common.dart b/flutter/lib/web/common.dart
new file mode 100644
index 000000000..bab3684ed
--- /dev/null
+++ b/flutter/lib/web/common.dart
@@ -0,0 +1,9 @@
+
+final isAndroid_ = false;
+final isIOS_ = false;
+final isWindows_ = false;
+final isMacOS_ = false;
+final isLinux_ = false;
+final isWeb_ = true;
+
+final isDesktop_ = false;
diff --git a/flutter/lib/web/plugin/handlers.dart b/flutter/lib/web/plugin/handlers.dart
new file mode 100644
index 000000000..f159ce9dd
--- /dev/null
+++ b/flutter/lib/web/plugin/handlers.dart
@@ -0,0 +1,14 @@
+abstract class NativeHandler {
+ bool onEvent(Map<String, dynamic> evt);
+}
+
+class NativeUiHandler extends NativeHandler {
+ NativeUiHandler._();
+
+ static NativeUiHandler instance = NativeUiHandler._();
+
+ @override
+ bool onEvent(Map<String, dynamic> evt) {
+ throw UnimplementedError();
+ }
+}
diff --git a/flutter/lib/web/texture_rgba_renderer.dart b/flutter/lib/web/texture_rgba_renderer.dart
new file mode 100644
index 000000000..834077735
--- /dev/null
+++ b/flutter/lib/web/texture_rgba_renderer.dart
@@ -0,0 +1,20 @@
+import 'dart:typed_data';
+
+class TextureRgbaRenderer {
+ Future<int> createTexture(int key) {
+ throw UnimplementedError();
+ }
+
+ Future<bool> closeTexture(int key) {
+ throw UnimplementedError();
+ }
+
+ Future<bool> onRgba(
+ int key, Uint8List data, int height, int width, int strideAlign) {
+ throw UnimplementedError();
+ }
+
+ Future<int> getTexturePtr(int key) {
+ throw UnimplementedError();
+ }
+}
diff --git a/flutter/lib/web/win32.dart b/flutter/lib/web/win32.dart
new file mode 100644
index 000000000..358cb5ebb
--- /dev/null
+++ b/flutter/lib/web/win32.dart
@@ -0,0 +1,5 @@
+
+/// No use, for compilation only.
+int getWindowsTargetBuildNumber_() {
+ return 0;
+}