This repository contains lessons and examples for learning Dart.
-
Install Dart SDK:
- Download and install the Dart SDK from the official Dart website.
-
Install Visual Studio Code:
- Download and install Visual Studio Code.
-
Install Dart Extension for VSCode:
- Open VSCode.
- Go to Extensions (
Ctrl+Shift+X
orCmd+Shift+X
on Mac). - Search for "Dart" and install the Dart extension.
-
Create a New Dart Project:
- Open the terminal in VSCode.
- Navigate to your desired directory.
- Run the following command to create a new Dart project:
dart create my_project
- Navigate into the project directory:
cd my_project
-
Open the Project in VSCode:
- Open the project folder in VSCode:
code .
- Open the project folder in VSCode:
-
Running Dart Code:
- Open the Dart file you want to run (e.g.,
bin/main.dart
). - Press
F5
to start debugging and run the Dart code, or use the terminal:dart run
- Open the Dart file you want to run (e.g.,
- If you encounter issues with Dart SDK not being recognized, ensure that the Dart SDK path is added to your system's PATH environment variable.
- Check the Dart documentation and the Dart extension for VSCode documentation for additional help.
Feel free to explore the Dart lessons and examples provided in this repository. Happy coding!