Flutter is based on Widgets and Widget Trees. And to create a flutter application we nest these Widgets within one another. So, in this article, we will see how to use the inspector tool in Flutter.
How to use the inspector tool in Flutter?
Just like in Native android you can view the blueprint of your app & its properties with the help of the .xml file. Flutter provides a tool called Flutter Inspector. This can help you to visualize the blueprint & properties of different widgets in the Flutter application. Along with visualization, the Inspector tool also helps in diagnosing Widget layout issues.
Note: The flutter inspector tool is currently available only on Android Studio IntelliJ IDE.
Tools included in Flutter Inspector:
1) Select Widget Mode:
With the help of this button, you can select different widgets from your app. You can inspect them one at a time. After selecting any Widget from the Widget Tree you can view the blueprint of that Widget with the help of the Layout Explorer tab. Also, you can check different properties and nested widgets of the selected Widget with the help of the Details Tree tab.
2) Refresh Tree:
Suppose you make changes in your app, and you hot reload those changes. But those changes will not immediately reflect in your Flutter Inspector tool. To visualize the changes you will have to click the Refresh Tree button.
3) Slow Animation:
Reduces the speed of animation between layouts.
4) Debug Paint:
When activated it creates a border around each widget present on your screen. In short, shows a blueprint of the whole layout.
5) Paint BaseLines:
It draws baselines for all the texts and icons currently present on the screen.
6) Repaint Rainbow:
When activated it creates a border around the widgets that are changing. So It’s a great tool to check/debug widgets that are changing. For example, let’s say we have our homepage which is a stateful widget. So whenever there are changes inside this widget, it will repaint the whole widget. This will be indicated by those rainbow-colored borders.
7) Invert Oversized Image:
This tool helps in identifying images of large sizes. Whenever developers create an application they want it to run as fast as possible. But when images with high Resolution and greater size are included, the performance of the app is affected (to be more precise speed and size of the app are affected).
Thanks for being with us on a Flutter Journey!
So, in this article, we have seen how to implement Grouped List in Flutter. Also, feel free to comment and provide any other suggestions regarding Flutter.
Flutter Agency is our portal Platform dedicated to Flutter Technology and Flutter Developers. The portal is full of cool resources from Flutter like Flutter Widget Guide, Flutter Projects, Code libs and etc.