1 - install Dart On Windows  ( 2024 - 2025 )

1 - install Dart On Windows ( 2024 - 2025 )

Introduction to Dart Installation on Windows

Overview of the Lesson

  • The lesson focuses on how to install Dart on a Windows operating system.

Steps for Downloading Dart SDK

  • Users are instructed to search for "Dart SDK archive" on Google, which leads them to the official Dart site.
  • It is emphasized that users should select the stable release channel and choose the latest version compatible with their operating system (Windows).
  • Users must decide between x64 or ARM architecture based on their processor type, with most opting for x64.

Installing Visual Studio Code

  • After downloading Dart, users are guided to download Visual Studio Code (VS Code), which will be used for development.
  • The installation process involves agreeing to prompts and creating a desktop icon for easy access.

Setting Up Dart in Visual Studio Code

Installing Dart Extension

  • Once VS Code is installed, users need to add the Dart extension by searching for "Dart" in the extensions marketplace and installing it.
  • Confirmation of successful installation is shown through an indication that the package has been installed without issues.

Adding Dart to Environment Variables

  • Users are instructed to copy the path where Dart was installed and add it to environment variables for proper functionality.
  • This involves navigating through system settings and ensuring that the path is correctly added under environment variables.

Verifying Installation

Checking Dart Version

  • To confirm successful installation, users can open Command Prompt and type dart --version. If done correctly, it should display the version number of Dart SDK installed.
  • Any errors indicate issues with adding paths in environment variables that need correction before proceeding further.

Creating a New Dart Project

Defining Project Location

  • Users learn how to create a new project by defining its location; they can navigate using Command Prompt directly from their Desktop folder or any desired directory.

Executing Project Creation Command

  • The command dart create <project_name> is used where <project_name> is replaced with user-defined names like "Project". Upon execution, this creates a new project folder structure automatically.

Opening and Running Your Project

Accessing Project in VS Code

  • To open the newly created project in VS Code, users can drag and drop the project folder into VS Code or use File > Open Folder option within VS Code interface.

Running Your First Program

  • Inside your project's bin folder, you can find your main file (e.g., main.dart). Users are advised on how to run this file either via an icon button or using Run options available in VS Code interface.

Alternative Methods of Creating Projects

Quick Project Setup Method

  • An alternative method mentioned allows users to quickly set up projects by creating a text file named main.dart directly within any chosen folder instead of using command line commands.

Caution Against Shortcuts

  • While this method provides speed, it's recommended that beginners stick with command line methods as they ensure all necessary files are created properly within project structure for better management later on.

Conclusion

  • The video concludes with encouragement towards practicing these steps while reminding viewers about subscribing for more content related to learning programming languages like Dart.