If you happen to be using ubuntu (I am on ubuntu 24.04) and encounter a similar problem try updating your .bash_profile
to use export PATH="$HOME/development/flutter/bin:$PATH"
instead of export PATH="~/development/flutter/bin:$PATH"
as recommended by the flutter website. Please not that this assumes that you will have followed the instructions listed on the website https://docs.flutter.dev/get-started/install/linux/android