In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
Editor to share with you how vscode writes and uses flutter applications. I hope you will learn a lot after reading this article. Let's discuss it together.
The way vscode writes and uses flutter applications is as follows:
1. Configure the plug-in
You need to download the plug-in in vscode
Just find these two plug-ins, download them and reload vscode.
2. Run
The run command for the flutter project is flutter run
But flutter differs from react-native in that flutter run then detects whether the device is connected and will not run down if there is no connected device.
You can connect to flutter devices, of course, if you configure the android environment, you can also use the dab command, adb devices.
After the project is running, there will be some output information in the terminal below, such as compilation time, debug package, installation, and so on.
And there are some tips.
Press r when you need hot load, and press R to restart the application.
So every time we write and save the code, we can see the latest effect by pressing r again, and the hot load of flutter is faster than that of rn.
3. Write the first flutter application.
According to flutter Chinese language Network (https://flutterchina.club/get-started/codelab/)
Write our first flutter app.
I have a personal problem among them.
It is in step 2, using external package
Declared the plug-in dependency in the pubspec.yaml file, saved and downloaded automatically, and then referenced the plug-in in the main.dart file, found that there is no automatic completion prompt, I handwritten all the paths, the prompt can not be found.
Then it is better to reopen vscode, which should be the problem of reading from vscode since then.
Then it is written according to the Chinese code. Flutter also has state, which is said to have been added based on the idea of state in react.
Personal experience
Flutter projects are smoother than rn, compile faster, hot load faster, and applications run more smoothly, but dart syntax really hurts.
The documents written by fluuter Chinese website do not feel very friendly, and many key things are not specific enough or even not written.
There is no explanation for this state, no instructions for the use of state, and then that route is also.
After reading this article, I believe you have a certain understanding of how vscode writes and uses flutter applications. If you want to know more about it, you are welcome to follow the industry information channel. Thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.