There are two ways to get started with Dart. If you want to try it out instantly in your browser, use an online playground; if you want to build a project on your local machine, install the Dart SDK.
dart
// hello.dart
void main() {
print('Dart setup is ready.');
}
// Terminal command:
// dart run hello.dartThe first part is the code you'd write in a Dart file, and the last two comment lines show the command to run in the terminal. Make sure the file name matches your actual file name.
You should see
Dart setup is ready.