sudo apt install flatpak
Flatpak support is now installed, but if you try to install a Flatpak package, you'll get “No remote refs found” error. In order to remedy this we need to add Flatpak repositories. This is done like this:
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo