9 lines
No EOL
553 B
Markdown
9 lines
No EOL
553 B
Markdown
Commands
|
|
|
|
- there r two ways to execute code
|
|
`dart main.dart` : directly runs code. useful for quick and single dart file
|
|
`dart run main.dart` : useful for running a project with lot of other dependencies specified in `pubspec.yaml` file
|
|
- dart uses AOT(Ahead Of Time) compiler to create executable and jit(Just In Time) interpreter to run code directly which means features like hot reload can be used
|
|
`dart run main.dart` : jit interpreter
|
|
`dart compile exe main.dart -o output` and to run this self contained executable called output `./output`
|
|
|