From 091a74dab68ad98c08a717ba9abbaed0fc647800 Mon Sep 17 00:00:00 2001 From: Anas35 <65850618+Anas35@users.noreply.github.com> Date: Mon, 1 Feb 2021 23:29:53 +0530 Subject: [PATCH] removed new keyword (#75049) --- packages/flutter_test/lib/src/finders.dart | 12 ++++++------ packages/flutter_test/lib/src/test_compat.dart | 6 +++--- packages/flutter_test/lib/src/widget_tester.dart | 6 +++--- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/flutter_test/lib/src/finders.dart b/packages/flutter_test/lib/src/finders.dart index fa3b2153e9..e9fb61b3f2 100644 --- a/packages/flutter_test/lib/src/finders.dart +++ b/packages/flutter_test/lib/src/finders.dart @@ -58,8 +58,8 @@ class CommonFinders { /// /// ```dart /// // Suppose you have a button with text 'Update' in it: - /// new Button( - /// child: new Text('Update') + /// Button( + /// child: Text('Update') /// ) /// /// // You can find and tap on it like this: @@ -125,8 +125,8 @@ class CommonFinders { /// /// ```dart /// // Suppose you have a button with icon 'arrow_forward' in it: - /// new Button( - /// child: new Icon(Icons.arrow_forward) + /// Button( + /// child: Icon(Icons.arrow_forward) /// ) /// /// // You can find and tap on it like this: @@ -167,8 +167,8 @@ class CommonFinders { /// /// ```dart /// // Suppose you have a button created like this: - /// Widget myButton = new Button( - /// child: new Text('Update') + /// Widget myButton = Button( + /// child: Text('Update') /// ); /// /// // You can find and tap on it like this: diff --git a/packages/flutter_test/lib/src/test_compat.dart b/packages/flutter_test/lib/src/test_compat.dart index 9749c76ec3..cd7e17db27 100644 --- a/packages/flutter_test/lib/src/test_compat.dart +++ b/packages/flutter_test/lib/src/test_compat.dart @@ -144,11 +144,11 @@ Future _runSkippedTest(Suite suiteConfig, Test test, List parents, /// // ... /// }, onPlatform: { /// // This test is especially slow on Windows. -/// 'windows': new Timeout.factor(2), +/// 'windows': Timeout.factor(2), /// 'browser': [ -/// new Skip('TODO: add browser support'), +/// Skip('TODO: add browser support'), /// // This will be slow on browsers once it works on them. -/// new Timeout.factor(2) +/// Timeout.factor(2) /// ] /// }); /// diff --git a/packages/flutter_test/lib/src/widget_tester.dart b/packages/flutter_test/lib/src/widget_tester.dart index 5f1183b038..d9e58c3346 100644 --- a/packages/flutter_test/lib/src/widget_tester.dart +++ b/packages/flutter_test/lib/src/widget_tester.dart @@ -100,7 +100,7 @@ typedef WidgetTesterCallback = Future Function(WidgetTester widgetTester); /// /// ```dart /// testWidgets('MyWidget', (WidgetTester tester) async { -/// await tester.pumpWidget(new MyWidget()); +/// await tester.pumpWidget(MyWidget()); /// await tester.tap(find.text('Save')); /// expect(find.text('Success'), findsOneWidget); /// }); @@ -371,8 +371,8 @@ const String kDebugWarning = ''' /// main() async { /// assert(false); // fail in checked mode /// await benchmarkWidgets((WidgetTester tester) async { -/// await tester.pumpWidget(new MyWidget()); -/// final Stopwatch timer = new Stopwatch()..start(); +/// await tester.pumpWidget(MyWidget()); +/// final Stopwatch timer = Stopwatch()..start(); /// for (int index = 0; index < 10000; index += 1) { /// await tester.tap(find.text('Tap me')); /// await tester.pump();