Live Chat Icon For mobile
Live Chat Icon
Popular Categories.NET  (151).NET Core  (25)Angular  (49)ASP.NET  (48)ASP.NET Core  (64)ASP.NET MVC  (86)Azure  (28)Blazor  (96)DocIO  (20)Essential JS 2  (71)Essential Studio  (163)File Formats  (20)Flutter  (110)JavaScript  (148)Microsoft  (101)PDF  (59)React  (33)Succinctly series  (122)Syncfusion  (480)TypeScript  (30)Uno Platform  (3)UWP  (4)Vue  (26)Webinar  (25)Windows Forms  (55)WinUI  (20)WPF  (122)Xamarin  (130)XlsIO  (24)Other CategoriesBarcode  (4)BI  (29)Bold BI  (3)Build conference  (6)Business intelligence  (53)Button  (4)C#  (107)Chart  (50)Cloud  (9)Company  (445)Dashboard  (6)Data Science  (3)Data Validation  (5)DataGrid  (47)Development  (257)Doc  (7)DockingManager  (1)eBook  (93)Enterprise  (22)Entity Framework  (5)Essential Tools  (14)Excel  (20)Extensions  (13)File Manager  (4)Gantt  (9)Gauge  (6)Git  (4)Grid  (27)HTML  (9)Installer  (2)Knockout  (2)LINQPad  (1)Linux  (2)M-Commerce  (1)Metro Studio  (11)Mobile  (226)Mobile MVC  (9)OLAP server  (1)Open source  (1)Orubase  (12)Partners  (21)PDF viewer  (23)Performance  (6)PHP  (1)PivotGrid  (4)Predictive Analytics  (6)Report Server  (3)Reporting  (10)Reporting / Back Office  (11)Rich Text Editor  (5)Road Map  (9)Scheduler  (26)SfDataGrid  (9)Silverlight  (21)Sneak Peek  (19)Solution Services  (2)Spreadsheet  (9)SQL  (7)Stock Chart  (1)Surface  (4)Tablets  (5)Theme  (11)Tips and Tricks  (60)UI  (130)Uncategorized  (68)Unix  (2)User interface  (68)Visual State Manager  (1)Visual Studio  (19)Visual Studio Code  (11)Web  (213)What's new  (139)Windows 8  (19)Windows App  (1)Windows Phone  (15)Windows Phone 7  (9)WinRT  (26)
Share on twitter
Share on facebook
Share on linkedin
10 Best VS Code Extensions for Flutter Development

10 Best Visual Studio Code Extensions for Flutter Development

Flutter is one of the most popular cross-platform UI frameworks for creating rich mobile, desktop, and web applications. With Flutter users growing tremendously, a vast collection of plugins and extensions are available in the market to help developers increase their productivity. In this blog, I’ll walk you through the 10 finest extensions that I use in the Visual Studio Code IDE for Flutter development. They are:

Hope you’ve already discovered and installed the Flutter and Dart extensions in Visual Studio Code for Flutter development. If you haven’t, you can get them from the Visual Studio Marketplace for Flutter and Dart.

You might be familiar with installing extensions in VS Code. However, for newbies, I have explained it here. Click on the extension icons in the left side menu, type the desired extension name in the search box, select the required extension, and then click Install. Ta-da! You’re done.

Installing Flutter Extension in Visual Studio Code
Installing Flutter Extension in Visual Studio Code

Now let’s dive into the list of extensions.

#1 Pubspec Assist

Do you get bored searching for required Flutter and Dart packages in pub.dev? Then, you should try this Pubspec Assist extension. This extension allows you to search for packages without having to leave the editor and then adds them to the pubspec.yaml file. In addition, it allows you to search for multiple packages simultaneously by separating the names with commas.

Searching for Packages within the Editor Using the Pubspec Assist Extension
Searching for Packages within the Editor Using the Pubspec Assist Extension

#2 Error Lens

Errors and warnings are normal during development, but the methods we use to handle them are unique. In the VS Code editor, the errors and warnings are usually shown at the bottom, and we must scroll through the list to see if there are additional problems.

The Error Lens extension highlights the error lines in the code and appends the error details at the end of the line. Error icons are also displayed in the gutter.

Also, you can customize the color of the error highlight in the settings.json file. This will make your mistakes appear more enticing.

Error Details Displayed Inline Using Error Lens Extension
Error Details Displayed Inline Using Error Lens Extension

#3 Flutter Tree

It’s difficult to recognize widgets in a tree when you construct an application with a large number of widgets. The Flutter Tree extension creates the desired widget tree with simplified syntax. This makes the creation of widget trees much easier, but you have to use its own syntax to do so, which is as follows.

Syntax

OneChild>MultipleChild[OneChild,MultipleChild[OneChild,OneChild],OneChild>OneChild]

Code generated

OneChild(
    child: MultipleChild(
        children: <Widget>[
            OneChild(),
            MultipleChild(
                children: <Widget>[
                    OneChild(),
                    OneChild(),
                ]
            ),
            OneChild(
                child: OneChild(),
            ),
        ]
    ),
)
Generating a Widget Tree with Simplified Syntax Using Flutter Tree Extension
Generating a Widget Tree with Simplified Syntax Using Flutter Tree Extension

#4 Bracket Pair Colorizer 2

We are frequently lost in the maze of nested classes and widgets, wasting a lot of time and effort attempting to find the correct bracket pair. Bracket Pair Colorizer 2 is a lifesaver when it comes to locating misplaced brackets.

You can also customize the color of bracket pairs.

Displaying Brackets in Different Colors Using Bracket Pair Colorizer 2
Displaying Brackets in Different Colors Using Bracket Pair Colorizer 2

#5 Dart Data Class Generator

Often, we overlook the creation of required methods in a class. VS Code has a feature that allows you to add missing methods, but you can only add one at a time. The Dart Data Class Generator overcomes this by building Dart data classes with the constructor, copyWith, toMap, fromMap, toJson, fromJson, toString, operator ==, and hashCode methods based on class attributes or raw JSON, as the name implies.

This extension also sorts the imports alphabetically and converts them to a proper format.

Generating Required Methods Using Dart Data Class Generator
Generating Required Methods Using Dart Data Class Generator

#6 Flutter Stylizer

Dealing with a huge code base that is not organized properly decreases developer productivity. The Flutter Stylizer extension erases this problem by organizing your methods in a consistent and opinionated way.

This tool organizes the classes within the file in the following manner:

Constructor – named constructor – public static variables – public instance variables – public override variables – private static variables – private instance variables – public override methods – other public methods – build method.

Flutter itself provides formatting choices, however, it only formats Dart files and it doesn’t re-order the code. Flutter formats the code based on these formatting rules.

Reordering the Code Using Flutter Stylizer
Reordering the Code Using Flutter Stylizer

#7 Better Comments

If all comments are in the same format, we won’t be able to prioritize the job, and there’s a risk of ignoring important tasks. The Better Comments extension aids in the creation of colorful comments, which makes them more readable. This makes it easier to keep track of the code comments.

All you have to do is start a comment with *, !, ?, or TODO, and it will be colored in an assigned way. You can also create your own comment styles using the settings.json file.

Styling Comments Using Better Comments
Styling Comments Using Better Comments

#8 Color Highlight

We deal with a wide range of colors when designing an application, but what if the colors we’re coding were visible in the code editor? This would be very productive by showing us the application colors without having to run the application. The Color Highlight add-on makes it possible to view the colors that are specified by styling the color in our code.

Displaying Color Previews in Editor Using Color Highlight
Displaying Color Previews in Editor Using Color Highlight

#9 Markdownlint

There are no compilers in the Flutter project that guarantee to find issues in README.md or CHANGELOG.md files. To remedy this, the Markdownlint plugin provides a set of guidelines to encourage Markdown file standards and uniformity. You can use this extension to check for problems locally and verify the content before publishing it live. Browse the user manual to learn more about rules.

In the following image, you can see errors like multiple consecutive blank lines, heading levels should increment by one, and the list should be surrounded by blank lines. On a related note, I would like to remind you that you can preview Markdown files in VS Code by using the Preview button.

Displaying Errors in Markdown Files Using Markdownlint Extension
Displaying Errors in Markdown Files Using Markdownlint Extension

#10 JSON to Dart Model

When working with n number of JSON files, creating Dart models for all of them is time-consuming. JSON to Dart Model creates a Dart class for the given JSON string. It’s possible to make JSON values required or default by adding r@ or d@ to your JSON key, and JSON to Dart Model will produce Dart models for you.

In the following figure, the JSON file is shown on the left, and the required classes and properties are shown on the right, which are produced from the JSON file using the JSON to Dart Model extension.

Generating Required Classes and Properties from JSON File Using JSON to Dart Model
Generating Required Classes and Properties from JSON File Using JSON to Dart Model

Conclusion

Thanks for reading! I hope you will be keen to use these Visual Studio Code extensions for Flutter. If you are using any other extensions in your day-to-day Flutter development and find them to be useful, please share them with us in the comments section below.

Browse our documentation to learn more about Syncfusion Flutter widgets. You can also see our Syncfusion Flutter app with many examples in this GitHub repo. Don’t miss our demo app in Google Play, App Store, the web, Windows Store, macOS, and Snapcraft (Linux).

If you aren’t a customer yet, you can try our 30-day free trial to check out our Flutter features.

Finally, if you wish to send us feedback or would like to submit any questions, please feel free to post them in the comments section of this blog post. You can also contact us through our support forumsfeedback portal, or Direct-Trac support system. We are always happy to assist you! 

Related blogs

Tags:

Share this post:

Share on twitter
Share on facebook
Share on linkedin

Comments (4)

Are you try https://marketplace.visualstudio.com/items?itemName=gornivv.vscode-flutter-files? It’s a quick and flexible way to generate new features in the project.

Dharanidharan Dharmasivam

Hi KRAVCHENKO,

Yes, the Flutter Files plugin is useful in generating new features in the project, and thanks for your suggestion. We will use this in our day-to-day development process.

Thanks,
Dharani.

Dharanidharan Dharmasivam

Hi NILESH,

Thanks for suggesting this plugin. This plugin is very much useful in predicting the colors, this converts our color codes and shows the color box. We will use this in our development environment.

Thanks,
Dharani.

Comments are closed.

Popular Now

Be the first to get updates

Subscribe RSS feed
Scroll To Top