mirror of
https://github.com/rustdesk/rustdesk.git
synced 2024-12-25 13:07:52 +08:00
2ececed0c1
Signed-off-by: 21pages <pages21@163.com>
19 lines
438 B
Dart
19 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']);
|
|
}
|
|
}
|