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 chooseEmpty ProjectYou can actually create oneFlutterProjects, but this describes the creation of empty projects.chooseNextAnd then you specify the path, and there’s one caveat hereProject locationtakeProject nameNote at the same timeProject nameDo not use hump nomenclatureThen follow the prompt to create a new oneModules Then specify theDartPath and version ofIf you don’t know, you can use the terminal to checkthennext Click on thefinish Continue to chooseok, 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 theASThe same choiceNew Flutter ProjectExcept in this case, we choseFlutter NextThen in order to distinguish the last empty project, we give the projectProject namefordart_demo1 Click on thefinishAnd waitcreat flutter project, the directory structure isWe just need to pay attentionmain()Function, we can delete the rest of the code to make it easier to learn the Dart syntax. Declare a String, and then holdcommandIf 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.