Unnecessary new (#20138)

* enable lint unnecessary_new

* fix tests

* fix tests

* fix tests
diff --git a/packages/flutter_tools/test/application_package_test.dart b/packages/flutter_tools/test/application_package_test.dart
index bdd6792..3b15cc3 100644
--- a/packages/flutter_tools/test/application_package_test.dart
+++ b/packages/flutter_tools/test/application_package_test.dart
@@ -43,12 +43,12 @@
 
   group('PrebuiltIOSApp', () {
     final Map<Type, Generator> overrides = <Type, Generator>{
-      FileSystem: () => new MemoryFileSystem(),
-      IOSWorkflow: () => new MockIosWorkFlow()
+      FileSystem: () => MemoryFileSystem(),
+      IOSWorkflow: () => MockIosWorkFlow()
     };
     testUsingContext('Error on non-existing file', () {
       final PrebuiltIOSApp iosApp =
-          new IOSApp.fromPrebuiltApp(fs.file('not_existing.ipa'));
+          IOSApp.fromPrebuiltApp(fs.file('not_existing.ipa'));
       expect(iosApp, isNull);
       final BufferLogger logger = context[Logger];
       expect(
@@ -59,7 +59,7 @@
     testUsingContext('Error on non-app-bundle folder', () {
       fs.directory('regular_folder').createSync();
       final PrebuiltIOSApp iosApp =
-          new IOSApp.fromPrebuiltApp(fs.file('regular_folder'));
+          IOSApp.fromPrebuiltApp(fs.file('regular_folder'));
       expect(iosApp, isNull);
       final BufferLogger logger = context[Logger];
       expect(
@@ -67,7 +67,7 @@
     }, overrides: overrides);
     testUsingContext('Error on no info.plist', () {
       fs.directory('bundle.app').createSync();
-      final PrebuiltIOSApp iosApp = new IOSApp.fromPrebuiltApp(fs.file('bundle.app'));
+      final PrebuiltIOSApp iosApp = IOSApp.fromPrebuiltApp(fs.file('bundle.app'));
       expect(iosApp, isNull);
       final BufferLogger logger = context[Logger];
       expect(
@@ -78,7 +78,7 @@
     testUsingContext('Error on bad info.plist', () {
       fs.directory('bundle.app').createSync();
       fs.file('bundle.app/Info.plist').writeAsStringSync(badPlistData);
-      final PrebuiltIOSApp iosApp = new IOSApp.fromPrebuiltApp(fs.file('bundle.app'));
+      final PrebuiltIOSApp iosApp = IOSApp.fromPrebuiltApp(fs.file('bundle.app'));
       expect(iosApp, isNull);
       final BufferLogger logger = context[Logger];
       expect(
@@ -90,7 +90,7 @@
     testUsingContext('Success with app bundle', () {
       fs.directory('bundle.app').createSync();
       fs.file('bundle.app/Info.plist').writeAsStringSync(plistData);
-      final PrebuiltIOSApp iosApp = new IOSApp.fromPrebuiltApp(fs.file('bundle.app'));
+      final PrebuiltIOSApp iosApp = IOSApp.fromPrebuiltApp(fs.file('bundle.app'));
       final BufferLogger logger = context[Logger];
       expect(logger.errorText, isEmpty);
       expect(iosApp.bundleDir.path, 'bundle.app');
@@ -100,7 +100,7 @@
     testUsingContext('Bad ipa zip-file, no payload dir', () {
       fs.file('app.ipa').createSync();
       when(os.unzip(fs.file('app.ipa'), any)).thenAnswer((Invocation _) {});
-      final PrebuiltIOSApp iosApp = new IOSApp.fromPrebuiltApp(fs.file('app.ipa'));
+      final PrebuiltIOSApp iosApp = IOSApp.fromPrebuiltApp(fs.file('app.ipa'));
       expect(iosApp, isNull);
       final BufferLogger logger = context[Logger];
       expect(
@@ -123,7 +123,7 @@
         fs.directory(bundlePath1).createSync(recursive: true);
         fs.directory(bundlePath2).createSync(recursive: true);
       });
-      final PrebuiltIOSApp iosApp = new IOSApp.fromPrebuiltApp(fs.file('app.ipa'));
+      final PrebuiltIOSApp iosApp = IOSApp.fromPrebuiltApp(fs.file('app.ipa'));
       expect(iosApp, isNull);
       final BufferLogger logger = context[Logger];
       expect(logger.errorText,
@@ -144,7 +144,7 @@
             .file(fs.path.join(bundleAppDir.path, 'Info.plist'))
             .writeAsStringSync(plistData);
       });
-      final PrebuiltIOSApp iosApp = new IOSApp.fromPrebuiltApp(fs.file('app.ipa'));
+      final PrebuiltIOSApp iosApp = IOSApp.fromPrebuiltApp(fs.file('app.ipa'));
       final BufferLogger logger = context[Logger];
       expect(logger.errorText, isEmpty);
       expect(iosApp.bundleDir.path, endsWith('bundle.app'));