Files
rustdesk/flutter/lib/plugin/event.dart
T

19 lines
438 B
Dart
Raw Normal View History

2023-04-26 16:07:58 +08:00
import 'dart:convert';
import 'package:flutter/material.dart';
2023-04-21 21:40:34 +08:00
void handlePluginEvent(
Map<String, dynamic> evt,
Function(Map<String, dynamic> e) handleMsgBox,
) {
2023-04-26 16:07:58 +08:00
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']);
2023-04-21 21:40:34 +08:00
}
}