This repository has been archived on 2025-06-08. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
rustdesk/flutter/lib/plugin/event.dart
21pages 2ececed0c1 use uuid as session id
Signed-off-by: 21pages <[email protected]>
2023-06-08 07:24:02 +08:00

18 lines
438 B
Dart

import 'dart:convert';
import 'package:flutter/material.dart';
void handlePluginEvent(
Map<String, dynamic> evt,
Function(Map<String, dynamic> e) handleMsgBox,
) {
Map<String, dynamic>? content;
try {
content = json.decode(evt['content']);
} catch (e) {
debugPrint(
'Json decode plugin event content failed: $e, ${evt['content']}');
}
if (content?['t'] == 'MsgBox') {
handleMsgBox(content?['c']);
}
}