If you are not feeling well, you go and see a doctor. The same goes for Flutter.
The Flutter diagnostics tool helps you identify configuration problems that might hinder a successful development workflow. As the output can be very helpful, it is required to include a diagnostic summary in every bug report in the official Flutter GitHub repository. Let’s have a look at the tool and its results.
Calling the doctor
Run the command
flutter doctor from your preferred command-line tool. Your output might look similar to this one:
The tool lists information about
? Flutter and OS version
? Possible dependency problems with the Android toolchain
? Development tools like Chrome, Visual Studio, and Android Studio
? Connected devices that you can deploy your app to
As I am on a Windows machine right now, there is no information about any Linux, iOS, or macOS errors because I can’t create these app types from a Windows OS. So if you are on Linux or macOS, your output might look different.
Calling the chatty doctor
Run the command
flutter doctor -v from your preferred command-line tool. Your output might look similar to this one:
Compared to the previous output, we receive a lot more information and details for every group. The command tends to run twice as long as the other one to gather all the additional facts. SDK paths, install locations, plugin and tool version information, recognized devices including deployment targets and version info, and much more.
The doctor came, shoveled a lot of information upon you, and then left again. If you don’t see an error here, if you spot all your devices (browsers, phones, emulators, desktop platforms), and if all your IDEs are found, you’ll be fine.
Flutter doctor is the first source for solving problems when you are experiencing strange behavior and error messages. It is part of the initial Flutter setup and will also be executed on every version upgrade. With this article, you might understand the details better.