Contents

Experiment flags

The Dart SDK often contains experimental features, which you can try by passing flags to Dart tools.

Using experiment flags with command-line tools

To use an experiment with Dart SDK command line tools, pass the corresponding flag to the tool. For example, to enable the experiments super-mixins and no-slow-checks, add those flags to the dart command:

$ dart --enable-experiment=super-mixins,no-slow-checks

Using experiment flags with IDEs

To enable experiments related to running or debugging apps in IDEs, edit the launch configuration:

Using experiment flags with the Dart analyzer (command-line and IDE)

To enable experiments affecting analysis, use the enable-experiment key in the analysis options file. Here’s an example of enabling the experiments super-mixins and no-slow-checks in analysis_options.yaml:

analyzer:
  enable-experiment:
    - super-mixins
    - no-slow-checks

More information