dart compile aot-snapshot <dart-entry-point>

Compile Dart to an AOT snapshot

Arguments

NameDescription
dart-entry-pointThe Dart file containing the main function

Options

NameDescription
-h, --helpPrint this usage information
-o, --output <dart-entry-point>Write the output to <file-name>
--verbosity <verbosity-level>Sets the verbosity level of the compilation
-D, --define <key-value-pairs...>Define an environment declaration. To specify multiple declarations, use multiple options or use commas to separate key-value pairs. For example: dart compile aot-snapshot -D a=1,b=2 main.dart
--enable-assertsEnable assert statements
-p, --packages <args-path>Get package locations from the specified file instead of .packages. <path> can be relative or absolute
--no-sound-null-safety, --sound-null-safetyRespect the nullability of types at runtime
-S, --save-debugging-info <debug-info-path>Remove debugging information from the output and save it separately to the specified file.. <path> can be relative or absolute