title: Dart / flutter test setup with null safety
body: <p>Update: It was a documentation bug, fixed with: <a href="https://github.com/dart-lang/test/pull/1471" rel="noreferrer">https://github.com/dart-lang/test/pull/1471</a></p>
  <p>According to the docs/examples for the test package (<a href="https://pub.dev/packages/test" rel="noreferrer">https://pub.dev/packages/test</a>) this test case should work and not trigger warnings.  However it does:</p>
  <pre><code>The non-nullable local variable 'b' must be assigned before it can be used.
  Try giving it an initializer expression, or ensure that it's assigned on every execution path.dart(not_assigned_potentially_non_nullable_local_variable)
  </code></pre>
  <p>Marking the variable as late works, but I want to check that I'm not missing something before I file a bug saying that the docs are wrong. =)</p>
  <pre class="lang-dart prettyprint-override"><code>import 'package:test/test.dart';
  
  void main() {
    String b;
  
    setUp(() {
      b = 'test';
    });
  
    group('foo', () {
      test('bar', () {
        print(b);
      });
    });
  }
  </code></pre>