Zoom Webinar: Learn and enhance your TypeScript skills | 28th March 2023 | 10 AM PST [10:30 PM IST] Register here

Flutter DevTools: A Tooling Suite For Flutter and Dart Developers



November 25, 2022


November 25, 2022

Have you ever imagined a life without Dev tools, how will you solve the productivity and quality issues in your app development? The Flutter team understands this, and thus it brings the best DevTools to the Flutter ecosystem.

In this article, we will discuss the Flutter DevTools and their function, but before that let's take a movement to understand why we need Flutter Dev Tool to build quality apps efficiently. 

Why do Flutter developers need DevTools for building a beautiful and high-Performance UI?

DevTools are basically needed for efficiency and effective app development. They are used to perform a number of operations more accurately in a minimum time. It is a complete tooling suite for Flutter and Dart developers that simplifies the following tasks:

  1. Visualization of Flutter widgets and layouts 
  2. Analyze performance issues
  3. Record, track and detect memory issues 
  4. View and record network traffic
  5. Supports debugging at the source level
  6. Displays events
  7. Analyzes app size

Now let’s take a detailed look at Flutter DevTools.

Flutter DevTools 

1. UI inspection: Inspect the UI layout and the state of the Flutter app

The Flutter Widget Inspector is a powerful tool for visualizing and exploring Flutter widget trees and is also used for understanding existing layouts and diagnosing layout issues. 

Also, the Flutter inspector makes it easy to inspect the state of running the Flutter application by understanding the structure of a widget tree. 

2. Performance View: Recognizes UI junk performance issues in a Flutter application

It offers timing and performance information for activity in the Flutter app. The Performance view consists of the following three parts:

  1. Flutter frame charts
  2. The timeline event charts 
  3. And CPU profiler

3. CPU Profiler View: CPU Profiling for Flutter or Dart application

The CPU profiler view allows Flutter users to record and profile a session from a Dart or Flutter app. The CPU profiler pulls the profiling data from VM and displays it in the profiler view.

4. Memory Profiling: Know how an isolate is using memory

It lets you peek at how an isolate is using memory at a given time. Memory profiling in DevTools consists of the following main functions.  

  1. Creating charts for memory statistics and events.
  2. Helps to detect memory issues and inspects objects.
  3. Monitor and track allocations and their track. 

5. Network View: Inspect HTTP, HTTPS, and Web socket traffic from Dart or Flutter app

Allows you to record network traffic, and see details like general and timing information about the network request as well as the response content along with the request headers and bodies. 

6. Debugger: Source-level debugging of a Flutter or Dart app

DevTool Debugger, supports breakpoints, stepping, and variable inspections. With the tool, you can see the source for the main entry point for the Flutter app loaded in the debugger and browse most of your application sources.  

7. Logging View:  Displays events 

It displays events from the Dart runtime, application frameworks, and application-level logging events. 

8. Size tool:  Analyzes the total size of your app

The tool allows you to analyze the application's total size and helps you compare the size information of the app. 

Installing DevTools to the Android Studio

Follow the steps below to install DevTools in your Android Studio:

Step 1: Install the Flutter plugin

If you don’t already have installed the Flutter plugin Install it. This can be done using the normal Plugin page in the IntelliJ and Android Studio settings. Once the setting->plug-ins page is open you can search for the Flutter in the marketplace to install it. 


Step2: Open DevTools

To open DevTools, run a Flutter application. This can be achieved by opening your Flutter project, ensuring that your device is connected, and click the Run or Debug button. 


Step3: Launch DevTools

Next launch DevTools from the toolbar/menu in the Flutter project. Once the app is running, you can start DevTools using one of the following instructions.

  1. Select the Open DevTools toolbar action from the Run view.
  2. Select the Open DevTools toolbar in the Debug view (during the debugging process).
  3. Select the Open DevTools action from the More Action menu in the Flutter inspect view. 

You can install the DevTool also from VS code, let's find out how to install DevTools from VS code.

Installing DevTools from VS Code

Follow the steps below to install DevTool from VS code

Step 1: Install Dart extension

To use the DevTool from VS Code, install the Dart extension, further you need to install the Flutter extension for debugging the Flutter app. 


Step 2: Launch the Flutter application

Next, you need to launch the Flutter application for debugging your app. Click Run > statrtDebugging to start debugging the app.

Once debugging is started, Darts opens the DevTools command in the VS Code command palette. When you open the app first time, you will be prompted to activate or upgrade DevTools. 


In this article, you have learned about the Flutter DevTools, why Flutter developers need them, and how to install DevTools with Android Studio and VS Code. 

Well, if you are building a mobile application and want to improve your development productivity try using DhiWise- A modern programming platform for web and mobile app developers. 

Its Flutter app builder simplifies app development by providing a range of features for improving development efficiency and quality.