plugin_framework, temporary solution to compilation errors

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou 2023-04-23 16:23:35 +08:00
parent 260c671d6c
commit 7156d41d3a

View File

@ -131,8 +131,15 @@ class PluginItem extends StatelessWidget {
peer: peerId, peer: peerId,
event: _makeEvent(ui.key), event: _makeEvent(ui.key),
), ),
trailingIcon: Icon( // to-do: support trailing icon, but it will cause tree shake error.
IconData(int.parse(ui.icon, radix: 16), fontFamily: 'MaterialIcons')), // ```
// This application cannot tree shake icons fonts. It has non-constant instances of IconData at the following locations:
// Target release_macos_bundle_flutter_assets failed: Exception: Avoid non-constant invocations of IconData or try to build again with --no-tree-shake-icons.
// ```
//
// trailingIcon: Icon(
// IconData(int.parse(ui.icon, radix: 16), fontFamily: 'MaterialIcons')),
//
// to-do: RustDesk translate or plugin translate ? // to-do: RustDesk translate or plugin translate ?
child: Text(ui.text), child: Text(ui.text),
ffi: ffi, ffi: ffi,