⚠️ This lesson is retired and might contain outdated information.

Setup your first Dart project on Windows

Jermaine Oppong
InstructorJermaine Oppong
Share this video with your friends

Social Share Links

Send Tweet
Published 6 years ago
Updated 2 years ago

We will setup our first command-line Dart application. We will use the Chocolatey package manager to install the SDK and write our first program. This will form the basis for future lessons.

Get Chocolatey → https://chocolatey.org/docs/installation

Get the gist of commands → https://gist.github.com/creativebracket/128dafcbbfdc1d6946231a931f95cb1b

Instructor: [00:00] Using the Chocolatey package manager, we can install the Dart SDK by running choco install dart-sdk. Alternatively, you can install the Dev Channel version by passing the pre flag. To upgrade a pre-existing Dart installation, run choco upgrade dart-sdk.

[00:23] Restart your command prompt in order to confirm your Dart installation. Confirm Dart is properly installed by typing the dart command and passing the version flag.

[00:32] In your working folder, create a pubspec.yaml file. A pubspec file contains metadata and configuration related to a Dart project. We will enter the minimum information about our project, such as a name, description, and an author.

[00:48] All starting files go in a bin folder. Let's create one containing a main.dart file. In this file, we will define a top-level function called main. Dart requires this function to start our application. Save the file and run. This completes the lesson.

~ 8 minutes ago

Member comments are a way for members to communicate, interact, and ask questions about a lesson.

The instructor or someone from the community might respond to your question Here are a few basic guidelines to commenting on egghead.io

Be on-Topic

Comments are for discussing a lesson. If you're having a general issue with the website functionality, please contact us at support@egghead.io.

Avoid meta-discussion

  • This was great!
  • This was horrible!
  • I didn't like this because it didn't match my skill level.
  • +1 It will likely be deleted as spam.

Code Problems?

Should be accompanied by code! Codesandbox or Stackblitz provide a way to share code and discuss it in context

Details and Context

Vague question? Vague answer. Any details and context you can provide will lure more interesting answers!

Markdown supported.
Become a member to join the discussionEnroll Today