• Vyacheslav Egorov's avatar
    Strong mode fixes in tests (#14520) · 0556e14f
    Vyacheslav Egorov authored
    * Use explicit types for onClick handler in diagnostics_test.
    
    This test formats it to string and expects exact match.
    
    Before this change onClick had type () => dynamic in Dart 1 and () => Null in
    Dart 2.
    
    * Fix strong mode issues in packages/flutter/test/material/dropdown_test.dart
    
    Pass explicit type argument to renderObjectList(...) in expressions like
    
         List<RenderBox> l = tester.renderObjectList(...).toList();
    
    Dart 2 mode inference is not strong enough to infer RenderBox as a type argument
    fto renderObjectList and passes RenderObject instead, which later leads to
    runtime check failures (because List<RenderObject> is not List<RenderBox>).
    
    * Fix strong mode issues in packages/flutter/test/material/theme_test.dart.
    
    Pass type argument explicity to widgetList. Dart 2 type inference can't infer
    it by itself.
    
    * Fix strong mode issue packages/flutter/test/widgets/unique_widget_test.dart
    
    Pass correct type argument to GlobalKey.
    
    * Fix type annotation in packages/flutter/test/material/app_test.dart.
    
    pushNamed returns Future<Object> not Future<String>.
    0556e14f
Name
Last commit
Last update
..
animation Loading commit data...
cupertino Loading commit data...
engine Loading commit data...
examples Loading commit data...
foundation Loading commit data...
gestures Loading commit data...
harness Loading commit data...
material Loading commit data...
painting Loading commit data...
physics Loading commit data...
rendering Loading commit data...
scheduler Loading commit data...
semantics Loading commit data...
services Loading commit data...
widgets Loading commit data...
service_extensions_test_file Loading commit data...