Following is the way I install Flutter to my arch. Maybe it is deprecated. I install flutter to my Mac through clone the flutter repository directly and run flutter precache
.
Flutter was installed on /opt/flutter
You need to source /etc/profile
or relogin to add flutter to your path.
This folder has root permissions, so keep in mind to run flutter as root, otherwise you will not be able to modify anything in this directory.
If you intend to use it as a regular user, create the Flutter users group:
groupadd flutterusers
Add your user into this group:
gpasswd -a <user> flutterusers
Change folder's group.
chown -R :flutterusers /opt/flutter
Change permissions of the folder so the user that was just added to the group will be able to write in it:
chmod -R g+w /opt/flutter
Re-login your terminal in to the newly created group:
newgrp flutterusers
Flutter use git to install and manage version. Changing channel is change git branch indeed. So you must fetch full branches from remote.