mirror of
https://github.com/rustdesk/rustdesk.git
synced 2024-12-03 03:19:27 +08:00
45d07686b9
Signed-off-by: fufesou <shuanglongchen@yeah.net>
20 lines
453 B
Dart
20 lines
453 B
Dart
import 'dart:convert';
|
|
import 'package:flutter/material.dart';
|
|
|
|
void handlePluginEvent(
|
|
Map<String, dynamic> evt,
|
|
String peer,
|
|
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']);
|
|
}
|
|
}
|