diff --git a/packages/flutter/test/foundation/diagnostics_test.dart b/packages/flutter/test/foundation/diagnostics_test.dart index 794de1c170..76adcc5b1d 100644 --- a/packages/flutter/test/foundation/diagnostics_test.dart +++ b/packages/flutter/test/foundation/diagnostics_test.dart @@ -970,7 +970,8 @@ void main() { }); test('missing callback property test', () { - final Function onClick = () {}; + void onClick() { } + final ObjectFlagProperty present = new ObjectFlagProperty( 'onClick', onClick, @@ -982,7 +983,7 @@ void main() { ifNull: 'disabled', ); - expect(present.toString(), equals('onClick: Closure: () => dynamic')); + expect(present.toString(), equals('onClick: Closure: () => void')); expect(present.isFiltered(DiagnosticLevel.fine), isTrue); expect(present.value, equals(onClick)); expect(missing.toString(), equals('disabled')); diff --git a/packages/flutter/test/material/app_test.dart b/packages/flutter/test/material/app_test.dart index e9387ba98d..43314ad385 100644 --- a/packages/flutter/test/material/app_test.dart +++ b/packages/flutter/test/material/app_test.dart @@ -173,7 +173,7 @@ void main() { }); testWidgets('Return value from pop is correct', (WidgetTester tester) async { - Future result; + Future result; await tester.pumpWidget( new MaterialApp( home: new Builder( diff --git a/packages/flutter/test/material/dropdown_test.dart b/packages/flutter/test/material/dropdown_test.dart index b644bc632c..a0eebe3e13 100644 --- a/packages/flutter/test/material/dropdown_test.dart +++ b/packages/flutter/test/material/dropdown_test.dart @@ -93,7 +93,7 @@ class _TestAppState extends State { // The RenderParagraphs should be aligned, i.e. they should have the same // size and location. void checkSelectedItemTextGeometry(WidgetTester tester, String value) { - final List boxes = tester.renderObjectList(find.byKey(new ValueKey(value + 'Text'))).toList(); + final List boxes = tester.renderObjectList(find.byKey(new ValueKey(value + 'Text'))).toList(); expect(boxes.length, equals(2)); final RenderBox box0 = boxes[0]; final RenderBox box1 = boxes[1]; @@ -232,7 +232,7 @@ void main() { ); await tester.tap(find.text(value)); await tester.pump(); - final List itemBoxes = tester.renderObjectList(find.byKey(itemKey)).toList(); + final List itemBoxes = tester.renderObjectList(find.byKey(itemKey)).toList(); expect(itemBoxes[0].localToGlobal(Offset.zero).dx, equals(0.0)); expect(itemBoxes[1].localToGlobal(Offset.zero).dx, equals(16.0)); expect(itemBoxes[1].size.width, equals(800.0 - 16.0 * 2)); @@ -354,7 +354,7 @@ void main() { // The selected dropdown item is both in menu we just popped up, and in // the IndexedStack contained by the dropdown button. Both of them should // have the same vertical center as the button. - final List itemBoxes = tester.renderObjectList(find.byKey(const ValueKey('two'))).toList(); + final List itemBoxes = tester.renderObjectList(find.byKey(const ValueKey('two'))).toList(); expect(itemBoxes.length, equals(2)); // When isDense is true, the button's height is reduced. The menu items' diff --git a/packages/flutter/test/material/theme_test.dart b/packages/flutter/test/material/theme_test.dart index da20ff6a00..dddc09bf85 100644 --- a/packages/flutter/test/material/theme_test.dart +++ b/packages/flutter/test/material/theme_test.dart @@ -252,7 +252,7 @@ void main() { await tester.tap(find.text('SHOW')); await tester.pump(const Duration(seconds: 1)); - final List materials = tester.widgetList(find.byType(Material)).toList(); + final List materials = tester.widgetList(find.byType(Material)).toList(); expect(materials.length, equals(2)); expect(materials[0].color, green); // app scaffold expect(materials[1].color, green); // dialog scaffold diff --git a/packages/flutter/test/widgets/unique_widget_test.dart b/packages/flutter/test/widgets/unique_widget_test.dart index 69fa1ba9d6..7f455cb58b 100644 --- a/packages/flutter/test/widgets/unique_widget_test.dart +++ b/packages/flutter/test/widgets/unique_widget_test.dart @@ -6,7 +6,7 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:flutter/widgets.dart'; class TestUniqueWidget extends UniqueWidget { - const TestUniqueWidget({ GlobalKey key }) : super(key: key); + const TestUniqueWidget({ GlobalKey key }) : super(key: key); @override TestUniqueWidgetState createState() => new TestUniqueWidgetState(); @@ -19,7 +19,7 @@ class TestUniqueWidgetState extends State { void main() { testWidgets('Unique widget control test', (WidgetTester tester) async { - final TestUniqueWidget widget = new TestUniqueWidget(key: new GlobalKey()); + final TestUniqueWidget widget = new TestUniqueWidget(key: new GlobalKey()); await tester.pumpWidget(widget);