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

43 lines
783 B
Dart
Raw Normal View History

2023-04-20 20:57:47 +08:00
import 'dart:convert';
2023-04-20 18:10:06 +08:00
typedef PluginId = String;
2023-04-20 20:57:47 +08:00
2023-04-20 22:53:43 +08:00
// ui location
2023-04-24 18:45:22 +08:00
const String kLocationHostMainPlugin = 'host|main|settings|plugin';
2023-04-20 22:53:43 +08:00
const String kLocationClientRemoteToolbarDisplay =
'client|remote|toolbar|display';
2023-04-20 20:57:47 +08:00
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());
}
}