title: Can not turn on non-nullable feature in an existing flutter project in Android Studio
body: <p>I have an existing project in Flutter in Android studio 4.0. I'm trying to migrate it to the dev channel with non-nullable feature turned on by default. What I did:</p>
  <ol>
  <li>Updated the SDK requirement in pubspec.yaml:</li>
  </ol>
  <pre><code>environment:
    sdk: &quot;&gt;=2.9.0-14.0.dev &lt;3.0.0&quot;
  </code></pre>
  <ol start="2">
  <li>Run pub get and pub upgrade:</li>
  </ol>
  <pre><code>&gt; flutter --version
  Flutter 1.20.0-3.0.pre • channel dev • https://github.com/flutter/flutter.git
  Framework • revision 0af027f805 (30 hours ago) • 2020-07-04 12:19:20 -0700
  Engine • revision a751393804
  Tools • Dart 2.9.0 (build 2.9.0-20.0.dev 22da8934ac)
  </code></pre>
  <ol start="3">
  <li>Created the <code>analysis_options.yaml</code> file with the following content:</li>
  </ol>
  <pre><code>analyzer:
    enable-experiment:
      - non-nullable
  </code></pre>
  <ol start="4">
  <li>I run this command:</li>
  </ol>
  <pre><code>&gt; dart --enable-experiment=non-nullable
  Usage: dart [&lt;vm-flags&gt;] &lt;dart-script-file&gt; [&lt;script-arguments&gt;]
  
  Executes the Dart script &lt;dart-script-file&gt; with the given list of &lt;script-arguments&gt;.
  
  Common VM flags:
  --enable-asserts
    Enable assert statements.
  --help or -h
    Display this message (add -v or --verbose for information about
    all VM options).
  --packages=&lt;path&gt;
    Where to find a package spec file.
  --observe[=&lt;port&gt;[/&lt;bind-address&gt;]]
    The observe flag is a convenience flag used to run a program with a
    set of options which are often useful for debugging under Observatory.
    These options are currently:
        --enable-vm-service[=&lt;port&gt;[/&lt;bind-address&gt;]]
        --pause-isolates-on-exit
        --pause-isolates-on-unhandled-exceptions
        --warn-on-pause-with-no-debugger
    This set is subject to change.
    Please see these options (--help --verbose) for further documentation.
  --write-service-info=&lt;file_uri&gt;
    Outputs information necessary to connect to the VM service to the
    specified file in JSON format. Useful for clients which are unable to
    listen to stdout for the Observatory listening message.
  --snapshot-kind=&lt;snapshot_kind&gt;
  --snapshot=&lt;file_name&gt;
    These snapshot options are used to generate a snapshot of the loaded
    Dart script:
      &lt;snapshot-kind&gt; controls the kind of snapshot, it could be
                      kernel(default) or app-jit
      &lt;file_name&gt; specifies the file into which the snapshot is written
  --version
    Print the SDK version.
  </code></pre>
  <p>But the result is nothing. When I run the project from IDE I get the following error:</p>
  <pre><code>Launching lib\main.dart on AOSP on IA Emulator in debug mode...
  Running Gradle task 'assembleDebug'...
  lib/ui/test.dart:21:6: Error: This requires the 'non-nullable' language feature to be enabled.
  Try updating your pubspec.yaml to set the minimum SDK constraint to 2.9 or higher, and running 'pub get'.
    int? v = 0;
       ^
  </code></pre>
  <p>I didn't found any clear official instructions on this case.</p>
  <p>What I'm doing wrong?</p>