plugin_framework, flutter event handlers

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2023-04-21 21:40:34 +08:00
parent ae6d80cebe
commit 67413b7419
15 changed files with 301 additions and 192 deletions

View File

@@ -0,0 +1,43 @@
import 'dart:convert';
typedef PluginId = String;
// ui location
const String kLocationHostMainDisplayOthers =
'host|main|settings|display|others';
const String kLocationClientRemoteToolbarDisplay =
'client|remote|toolbar|display';
class MsgFromUi {
String id;
String name;
String location;
String key;
String value;
String action;
MsgFromUi({
required this.id,
required this.name,
required this.location,
required this.key,
required this.value,
required this.action,
});
Map<String, dynamic> toJson() {
return <String, dynamic>{
'id': id,
'name': name,
'location': location,
'key': key,
'value': value,
'action': action,
};
}
@override
String toString() {
return jsonEncode(toJson());
}
}