Flutter는 풍부한 모바일, 데스크톱 및 웹 애플리케이션을 개발하는 데 사용되는 가장 수요가 많은 교차 플랫폼 UI 프레임워크 중 하나입니다.Flutter 사용자의 수가 증가함에 따라 개발자가 작업을 신속하게 처리할 수 있도록 광범위한 플러그인 및 추가 기능을 사용할 수 있습니다.이 게시물에서는 Flutter 프로그래밍을 위해Visual Studio Code IDE에서 활용하는 상위 10개 확장에 대한 세부 정보를 제공합니다
Pubspec Assist
Error Lens
Flutter Tree
Bracket Pain Colorizer 2
Dart Data Class Generator
Flutter Stylizer
Better Comments
Color Highlight
Markdownlint
JSON to Dart Model
Flutter 앱 빌드를 위해 Visual Studio Code에서 Flutter 및 Dart 추가 기능을 이미 찾고 설정했다고 믿습니다.그렇지 않은 경우Flutter및Dart용 Visual Studio Marketplace에서 가져올 수 있습니다 .
VS Code에서 확장 설치에 익숙할 수 있습니다.그러나 초보자를 위해 여기에서 설명했습니다.왼쪽 메뉴에서 확장 프로그램 아이콘을 클릭하고 검색 상자에 원하는 확장 프로그램 이름을 입력하고 필요한 확장 프로그램을 선택한 다음 설치를 클릭합니다.
#1 Pubspec Assist
Are you tired of trying to locate the necessary Flutter and Dart packages on pub.dev? You should give the Pubspec Assist extension a go. This extension permits you to search for packages without relinquishing your editor and then appends them to the pubspec.yaml document. Moreover, it allows you to look for numerous packages simultaneously by separating the titles with commas.
#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.
TheError Lens extensionhighlights 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.
#3 Flutter Tree
It’s difficult to recognize widgets in a tree when you construct an application with a large number of widgets. TheFlutter Tree extensioncreates 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.
#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 2is a lifesaver when it comes to locating misplaced brackets.
You can also customize the color of bracket pairs.
#5 Dart Data Class Generator
Often, we overlook the creation of required methods in a class. VS Code has a utility that allows you to add missing methods, but you can only add one at a time. TheDart Data Class Generatorovercomes 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.
#6 Flutter Stylizer
Managing a complex code repository that is not structured adequately diminishes engineer efficiency. TheFlutter Stylizerextension 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 theseformatting rules.
#7 Better Comments
If all comments are in the same format, we won’t be able to arrange the work in order of importance, and there’s a risk of ignoring important tasks. TheBetter Commentsextension 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.
#8 Color Highlight
We manage an extensive selection of colors while constructing a program, yet suppose the shades we’re programming were discernible in the code editor? This would be remarkably advantageous by exhibiting the program colors without needing to initiate the program. TheColor Highlightadd-on makes it possible to view the colors that are specified by styling the color in our code.
#9 Markdownlint
No validators in the Flutter project can ensure the detection of problems in README.md or CHANGELOG.md documents. To remedy this, theMarkdownlintplugin 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 theuser manualto learn more about rules.
In this 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.
#10 JSON to Dart Model
When dealing with n amount of JSON files, constructing Dart models for each one is laborious.JSON to Dart Modelcreates 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 is produced from the JSON file using the JSON to Dart Model extension.
Add entry intoauto-rename-tag.activationOnLanguageto set the languages that the extension will be activated. By default, it is["*"]and will be activated for all languages.
The setting should be set with language id defined inVS Code. Takingjavascript definitionas an example, we need to usejavascriptfor.jsand.es6, usejavascriptreactfor.jsx. So, if you want to enable this extension on.jsfile, you need to addjavascriptin settings.json.
Note
From 1.44, VS Code offers the built-inauto update tagssupport for HTML and Handlebars that can be enabled with the settingeditor.linkedEditing. If this setting is enabled, this extension will skip HTML and Handlebars files regardless of the languages listed inauto-rename-tag.activationOnLanguage
Before working on a new project, you surely need to organize your previous one and make everything structured. A Visual Studio Code extension called VSCode Project Dashboard enables you to organize your projects in any possible way. You can access frequently used files, folders, and SSH remotes quickly, and pin them to a dashboard.
If you’re constantly using GIT, then you definitely need to install this extension. With Git Graph, you can easily view your history, and all your commits and manipulate them all. As you can see in the example below, you can directly access every important aspect of your repository right inside of VSCode, which is pretty useful. Even if you haven’t used Git, you should start to. It’s the easiest and best way to work with your team, and it will improve your workflow exponentially!
If I knew about this extension, I wouldn’t be so sloppy in my coding and could accomplish my tasks more quickly. Toggle Zen Mode adds a new button. When you press on this button, it will activate VSCode’s Zen mode feature and remove all unnecessary clutter from the screen. In other words, it helps you to be more focused on your code and fall into a flow statement, which will significantly increase your productivity and efficiency!
The next extension in our list is Peacock, which has over 1.9 million downloads; however, many developers still haven’t heard of it before. It simply changes the color of your Visual Studio Code workspace. Ideal for quickly identifying your editor when you have multiple instances of VS Code or use VS Code's Remote features.
The Web 3.0 sphere and all technologies related to it, such as crypto, NFT, DeFi, and many others, are booming right now. I wrote an article about the importance of Web 3.0 in the future and why you should pay attention to it. And many developers working in this sphere are struggling with writing smart contracts on Solidity, which is a programming language for Ethereum. Truffle for VS Code simplifies how you create, build, debug, and deploy smart contracts on Ethereum and all EVM-compatible blockchains and layer 2 scaling solutions. So if you're a blockchain developer, you surely need it!
TheRemote — SSHextension lets you use any remote machine with an SSH server as your development environment. This can greatly simplify development and troubleshooting in a wide variety of situations. You can either develop on the same operating system you deploy to or use larger, faster, or more specialized hardware than your local machine. Also, quickly swap between different, remote development environments and safely make updates without worrying about impacting your local machine.
It’s a simple and powerful extension to add wrapper snippets around your code blocks. By using Surround extensions, you can upgrade your code to another level. You can wrap already existing lines and turn them into a function, a loop, a try/catch method, and many other essential methods.
I hate CSV files. There’s nothing structured, and I get really bored with constant searching for specific information that I need. If you’re also struggling with these types of problems and want to make your CSV file readable, then this extension is right for you! It highlights different types of data and shows them to you in a better way.
Better Comments is a pretty popular extension; however, I still want to add it to this list. As you might guess from the title, it helps you write better comments for your code. If you’re always struggling with default gray comments and lose focus finding the important one, then this extension is right for you. It will make your comments look prettier and will help others understand your code much easier!
This extension was previously covered in one of my other lists. It’s definitely for you if you frequently work with databases or simply need some random information for the test, even though I think it’s really cool. Names, numbers, and even email addresses can all be generated at random using Random Everything. So, yeah, it’s pretty cool and essential for everybody!
One of the latest extensions on the list is Resouce Monitor. There’s nothing so difficult in this extension. It just shows you some information about your system and usage. It can display CPU frequency, usage, memory consumption, and battery percentage remaining within the VSCode status bar.
Everyone is tired ofOne Dark Pro, right? Me too. So, there’s probably a better alternative to make your VS Code even prettier. It’s called "shades of purple," and yeah, you guessed right, it’s a purple color scheme for your IDE. However, there are no toxic colors, and it looks pretty nice. I’ve switched to this theme myself and am happy with the results!