Flutter- Several ways to create a Flutter project

Method 1 : Create a terminal command line, open the terminal, open the cd to create the storage location of the project file, enterflutter create 项目名

flutter create 项目名

Note"xxx项目名" is not a valid Dart package name. ⚠️: Such an error message may appear during the creation process .
insert image description here

Here we need to pay attention 命名规范:
Package names should be all lowercase, with underscores to separate words, 'just_like_this'. Use only basic Latin letters and Arabic digits: [a-z0-9_].
That is:项目名称只能出现小写字母、下划线_以及0-9的数字

Method 2 : Use vs codedevelopment tools to create

Note ❗️: To use this method, two plugins must be installed: Flutterand dart
You can also install Awesome Flutter Snippetsthis plugin, the smart prompt code
insert image description here
insert image description here
insert image description here

Press in vs code commode+shift+pto bring up the following picture, after selecting it, Flutter:New Projectdirectly enter the project name in the input box, press Enter, and follow the prompts
insert image description here

run
insert image description here

Method 3 : Android StudioCreate a project using

Install the plug-in first: Flutterand dart, click in the upper left corner Android Studio, select Settings Settings, findPlugins

insert image description here
insert image description here

create project
insert image description here
insert image description here
insert image description here

Guess you like

Origin blog.csdn.net/m0_48259951/article/details/128835109