title: How to make widget tests in flutter run if it gives the following error?
body: <p>My test already worked, but when I upgraded Flutter to a new version it gives an error when I run it from command line with </p>
  
  <pre><code>flutter test test/widget_test.dart
  </code></pre>
  
  <p>The error is </p>
  
  <pre><code>00:05 +0 -1: loading /Users/lenz/plug_and_plink/test/widget_test.dart [E]                                                                                                                           
    Failed to load "/Users/lenz/project/test/widget_test.dart": type '(WidgetTester) =&gt; Future&lt;Null&gt;' is not a subtype of type '() =&gt; dynamic'
    package:flutter_test/src/test_compat.dart 171:29  test
    test/widget_test.dart 53:3                        main
  
  00:05 +0 -1: Some tests failed. 
  </code></pre>
  
  <p>When I try to run the test from Android studio UI it gives another error:</p>
  
  <pre><code>file:///Users/lenz/development/flutter/packages/flutter/lib/src/material/animated_icons.dart:9:8: Error: Not found: 'dart:ui'
  import 'dart:ui' as ui show Paint, Path, Canvas;
         ^
  file:///Users/lenz/development/flutter/packages/flutter/lib/src/material/animated_icons.dart:10:8: Error: Not found: 'dart:ui'
  import 'dart:ui' show lerpDouble;
         ^
  file:///Users/lenz/development/flutter/packages/flutter/lib/src/material/app.dart:5:8: Error: Not found: 'dart:ui'
  import 'dart:ui' as ui;
  </code></pre>
  
  <p>And a lot more lines about 'dart:ui'
  What to do to make it work again?</p>