Small knowledge, big challenge! This paper is participating in theEssentials for programmers”Creative activities
preface
Ok, past the environment configuration of the previous few articles. Let’s create a Dart project today!
- Configure and install the Flutter environment on MacOS
- Flutter runs the sample project on MacOS
Create an empty project using AS
Open AS and seeNew Flutter Project
choose
Empty Project
You can actually create oneFlutter
Projects, but this describes the creation of empty projects.choose
Next
And then you specify the path, and there’s one caveat hereProject location
takeProject name
Note at the same timeProject name
Do not use hump nomenclatureThen follow the prompt to create a new one
Modules
Then specify the
Dart
Path and version ofIf you don’t know, you can use the terminal to check
then
next
Click on the
finish
Continue to choose
ok
, an empty Dart project is created, and click the Run console to appearhello world
All of this is using AS to create an empty Dart project.
Create a Flutter App using AS
In fact, this method is more recommended, because the steps are relatively simple, and you can see the source code. Open theAS
The same choiceNew Flutter Project
Except in this case, we choseFlutter
Next
Then in order to distinguish the last empty project, we give the projectProject name
fordart_demo1
Click on the
finish
And waitcreat flutter project
, the directory structure isWe just need to pay attention
main()
Function, we can delete the rest of the code to make it easier to learn the Dart syntax. Declare a String, and then holdcommand
If it was just an empty project, we wouldn’t be able to look at it.
Ok, so it’s time to begin the basic Dart syntax.