Useful Flutter Commands

Quick list of Flutter commands. I’ll keep adding to this as I think of them…

flutter doctor

This does a health check on your flutter installation and checks that everything is set up as it’s supposed to be. It’ll flag problems and will usually give instructions on how to solve those problems

If you want to find more detailed info (including installation paths) then add -v to get the verbose version

flutter devices

Checks for connected flutter capable devices (targets) and displays information on them. Will look something like this…

flutter doctor --android-licenses

This will agree to Android licenses. Often handy when flutter doctor points out that you haven’t agreed to them

flutter clean

Cleans the project and removes any content adding during a build. Handy for when you’re checking in and don’t want to additional files

flutter upgrade

upgrade flutter to the latest version

flutter build web

Build content to your local web directory to allow pushing to a website

flutter pub get

Will update the local dependencies to match the pubspec.yaml file

flutter build appbundle

This will build an aar for Android (assuming you’ve set everything up correctly)


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: