Non-hardcoded path to load data, since it need to be installed to a special prefix. It can be hardcoded at compile time, but I don't really suggest that, since if you want also android support, it has to be based on the XDG_* path.
DBus System tray (e.g. the one used by KDE) can only load icon from host.
Only icon named after the flatpak package name can be exported by flatpak, that's why all icons used by fcitx are named like org.fcitx.Fcitx5.****.png .
Fcitx 5 engine can be distributed via Flatpak.
https://fcitx-im.org/wiki/Install_Fcitx_5#Install_Fcitx_5_from_Flatpak https://github.com/flathub/?q=org.fcitx.Fcitx5&type=all&language=&sort=
To support flatpak, usually it need to support:
Reference: https://github.com/fcitx/flatpak-fcitx5/