The method of writing and using flutter applications with vscode is:
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 running command of the flutter project is flutter run
But the difference between flutter and react-native is that after flutter run, it will detect whether the device is connected. , if there is no connected device, it will not run.
You can use flutter devices. Of course, if you configure the android environment, you can also use the dab command and adb devices.
After the project is running, there will be some output information in the terminal below, including compilation time, debugging package, installation, etc.
There are also some prompt messages
Press r when you need to hot load, and press R when you need to restart the application.
So every time we write the code and save it, just press r again to see the latest effect, and flutter's hot loading is faster than rn's.
3. Write the first flutter application.
Follow the flutter Chinese website (https://flutterchina.club/get-started/codelab/)
Write our first flutter application.
I personally encountered a problem.
In step 2, using external packages,
declares the plug-in dependency in the pubspec.yaml file, automatically downloads it after saving, and then in main. The plug-in was referenced in the dart file, and I found that there was no automatic completion prompt. I wrote all the paths by hand, but the prompt was not found.
Then reopen vscode. It should be a problem with vscode reading this.
Then continue to write according to the Chinese code. Flutter also has state, which is said to be added based on the idea of state in react.
Personal experience
The flutter project is smoother than rn, compiles faster, hot loads faster, and the application runs more smoothly, but the dart syntax is really painful
fluuter Chinese website writing The documentation does not feel very user-friendly, and many key things are not specific enough or even not written.
There is no explanation of state, no instructions for using state, and the same goes for routing.
Recommended tutorial: "vscode Getting Started Tutorial"
The above is the detailed content of How to write and use flutter applications with vscode. For more information, please follow other related articles on the PHP Chinese website!

VisualStudio is suitable for large-scale projects and enterprise-level application development, while VSCode is suitable for rapid development and multilingual support. 1. VisualStudio provides a comprehensive IDE environment and supports Microsoft technology stack. 2.VSCode is a lightweight editor that emphasizes flexibility and scalability, and supports cross-platform.

Yes, some versions of VisualStudio are free. Specifically, VisualStudioCommunityEdition is free for individual developers, open source projects, academic research, and small organizations. However, there are also paid versions such as VisualStudioProfessional and Enterprise, suitable for large teams and enterprises, providing additional features.

Cross-platform development with VisualStudio is feasible, and by supporting frameworks like .NETCore and Xamarin, developers can write code at once and run on multiple operating systems. 1) Create .NETCore projects and use their cross-platform capabilities, 2) Use Xamarin for mobile application development, 3) Use asynchronous programming and code reuse to optimize performance to ensure efficient operation and maintainability of applications.

The ways to format JSON in VS Code are: 1. Use shortcut keys (Windows/Linux: Ctrl Shift I; macOS: Cmd Shift I); 2. Go through the menu ("Edit" > "Format Document"); 3. Install JSON formatter extensions (such as Prettier); 4. Format manually (use shortcut keys to indent/extract blocks or add braces and semicolons); 5. Use external tools (such as JSONLint and JSON Formatter).

Compiling code in VSCode is divided into 5 steps: Install the C extension; create the "main.cpp" file in the project folder; configure the compiler (such as MinGW); compile the code with the shortcut key ("Ctrl Shift B") or the "Build" button; run the compiled program with the shortcut key ("F5") or the "Run" button.

To install Visual Studio Code, please follow the following steps: Visit the official website https://code.visualstudio.com/; download the installer according to the operating system; run the installer; accept the license agreement and select the installation path; VSCode will start automatically after the installation is completed.

The methods to enlarge fonts in Visual Studio Code are: open the settings panel (Ctrl, or Cmd,). Search and adjust "Font Size". Choose "Font Family" with the right size. Install or select a theme that provides the right size. Use keyboard shortcuts (Ctrl or Cmd) to enlarge the font.

How to connect to a remote server through VSCode? Install Remote - SSH Extended Configuration SSH Create a Connection in VSCode Enter connection information: Host, Username, Port, SSH Key Double-click the saved connection in Remote Explorer


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

SublimeText3 English version
Recommended: Win version, supports code prompts!

Dreamweaver Mac version
Visual web development tools

Zend Studio 13.0.1
Powerful PHP integrated development environment

SublimeText3 Mac version
God-level code editing software (SublimeText3)

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function