Flatpak and Snap are useless.

So the point of Flatpak and Snap is to have Linux and IoT apps be cross-platform? Why? Writing code for Linux with specifically Ubuntu on an x86 computer in mind and then taking that same application, using Flatpak or Snap to quickly without changes to the code itself, and running it in Raspbian on an armv7l SBC is stupid. The code is optimised for Ubuntu and takes that distro's flaws and strong points into consideration but taking that exact same code, compiling it for ARM instead of x86 and slapping it on Raspbian is making the code run on an environment it was never meant to run in and you should be expecting failure. If you use Snap or Flatpak to put the code on a "storefront" like Snapcraft or Flathub, that's also stupid. Users of Linux are expected to have an understanding of the package manager they use whether it be apt, dnf, pacman or zypper and putting it on repos for snap or flatpak means they either have to install a GUI storefront or another package manager. You're better off distributing your code either yourself (through .deb files, .rpm files or even .AppImage files) or putting it on a user repository for that specific distro (PPAs on Launchpad for Ubuntu or the AUR for Arch Linux).