mirror of
https://github.com/StarCitizenToolBox/app.git
synced 2026-02-06 15:10:20 +00:00
feat: WASM web support
This commit is contained in:
@@ -1,24 +1,15 @@
|
||||
// This file is automatically generated, so please do not edit it.
|
||||
// @generated by `flutter_rust_bridge`@ 2.11.1.
|
||||
// Web platform stub for win32_api
|
||||
// Windows API 在 Web 平台上不可用,提供空实现
|
||||
|
||||
// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import
|
||||
/// 发送系统通知(Web 平台使用控制台输出)
|
||||
Future<void> sendNotify({String? summary, String? body, String? appName, String? appId}) async {
|
||||
print('Notification: $summary - $body');
|
||||
// Web 平台可以使用浏览器 Notification API
|
||||
// 但需要用户授权,这里简化处理
|
||||
}
|
||||
|
||||
import '../frb_generated.dart';
|
||||
import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart';
|
||||
|
||||
Future<void> sendNotify({
|
||||
String? summary,
|
||||
String? body,
|
||||
String? appName,
|
||||
String? appId,
|
||||
}) => RustLib.instance.api.crateApiWin32ApiSendNotify(
|
||||
summary: summary,
|
||||
body: body,
|
||||
appName: appName,
|
||||
appId: appId,
|
||||
);
|
||||
|
||||
Future<bool> setForegroundWindow({required String windowName}) => RustLib
|
||||
.instance
|
||||
.api
|
||||
.crateApiWin32ApiSetForegroundWindow(windowName: windowName);
|
||||
/// 设置窗口为前台(Web 平台不支持)
|
||||
Future<bool> setForegroundWindow({required String windowName}) async {
|
||||
print('setForegroundWindow not supported on web platform');
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user