From 11609d111464c5cfc17a780f95a6bcd66a3d8c4a Mon Sep 17 00:00:00 2001 From: Sam Rawlins Date: Tue, 2 Feb 2021 00:22:14 -0800 Subject: [PATCH] Remove "unnecessary" imports. (#75198) In each library where an import is removed, the library uses some elements provided by the import, BUT there is another import which provides all of the same elements, and at least one more which the library uses. In this change, we remove the imports which can be simply removed in favor of the other already present imports. See https://github.com/dart-lang/sdk/issues/44569 for more information. --- packages/flutter/test/painting/border_rtl_test.dart | 1 - packages/flutter/test/painting/colors_test.dart | 1 - packages/flutter/test/painting/common_matchers.dart | 1 - .../test/painting/continuous_rectangle_border_test.dart | 1 - packages/flutter/test/painting/flutter_logo_test.dart | 1 - packages/flutter/test/painting/gradient_test.dart | 1 - .../test/painting/image_provider_network_image_test.dart | 1 - packages/flutter/test/painting/image_test_utils.dart | 2 -- packages/flutter/test/painting/system_fonts_test.dart | 2 -- packages/flutter/test/painting/text_painter_test.dart | 3 --- packages/flutter/test/painting/text_span_test.dart | 1 - 11 files changed, 15 deletions(-) diff --git a/packages/flutter/test/painting/border_rtl_test.dart b/packages/flutter/test/painting/border_rtl_test.dart index c99299ab6c..5cd0711a72 100644 --- a/packages/flutter/test/painting/border_rtl_test.dart +++ b/packages/flutter/test/painting/border_rtl_test.dart @@ -7,7 +7,6 @@ import 'package:flutter/painting.dart'; import 'package:flutter_test/flutter_test.dart'; import '../rendering/mock_canvas.dart'; -import '../rendering/rendering_tester.dart'; class SillyBorder extends BoxBorder { @override diff --git a/packages/flutter/test/painting/colors_test.dart b/packages/flutter/test/painting/colors_test.dart index f006adfd76..f48663daeb 100644 --- a/packages/flutter/test/painting/colors_test.dart +++ b/packages/flutter/test/painting/colors_test.dart @@ -3,7 +3,6 @@ // found in the LICENSE file. import 'package:flutter/foundation.dart'; -import 'package:flutter/painting.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:flutter/material.dart'; diff --git a/packages/flutter/test/painting/common_matchers.dart b/packages/flutter/test/painting/common_matchers.dart index fb9932817d..96c04b66ac 100644 --- a/packages/flutter/test/painting/common_matchers.dart +++ b/packages/flutter/test/painting/common_matchers.dart @@ -2,7 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import 'package:flutter/painting.dart'; import 'package:flutter_test/flutter_test.dart'; import '../rendering/mock_canvas.dart'; diff --git a/packages/flutter/test/painting/continuous_rectangle_border_test.dart b/packages/flutter/test/painting/continuous_rectangle_border_test.dart index 78d0bc4d13..3838916610 100644 --- a/packages/flutter/test/painting/continuous_rectangle_border_test.dart +++ b/packages/flutter/test/painting/continuous_rectangle_border_test.dart @@ -3,7 +3,6 @@ // found in the LICENSE file. import 'package:flutter/material.dart'; -import 'package:flutter/painting.dart'; import 'package:flutter_test/flutter_test.dart'; import '../rendering/mock_canvas.dart'; diff --git a/packages/flutter/test/painting/flutter_logo_test.dart b/packages/flutter/test/painting/flutter_logo_test.dart index c7d0efde2c..ca91dab0ad 100644 --- a/packages/flutter/test/painting/flutter_logo_test.dart +++ b/packages/flutter/test/painting/flutter_logo_test.dart @@ -4,7 +4,6 @@ import 'package:flutter/widgets.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:flutter/painting.dart'; void main() { // Here and below, see: https://github.com/dart-lang/sdk/issues/26980 diff --git a/packages/flutter/test/painting/gradient_test.dart b/packages/flutter/test/painting/gradient_test.dart index 7283b0ec35..5f41dcb0f3 100644 --- a/packages/flutter/test/painting/gradient_test.dart +++ b/packages/flutter/test/painting/gradient_test.dart @@ -6,7 +6,6 @@ import 'dart:math' as math; import 'package:flutter/widgets.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:flutter/painting.dart'; void main() { test('LinearGradient scale test', () { diff --git a/packages/flutter/test/painting/image_provider_network_image_test.dart b/packages/flutter/test/painting/image_provider_network_image_test.dart index 2bcacc5b91..7917fdbef8 100644 --- a/packages/flutter/test/painting/image_provider_network_image_test.dart +++ b/packages/flutter/test/painting/image_provider_network_image_test.dart @@ -12,7 +12,6 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/painting.dart'; import 'package:flutter_test/flutter_test.dart'; -import '../flutter_test_alternative.dart' show Fake; import '../image_data.dart'; import '../rendering/rendering_tester.dart'; diff --git a/packages/flutter/test/painting/image_test_utils.dart b/packages/flutter/test/painting/image_test_utils.dart index e26c908022..9183b4dc03 100644 --- a/packages/flutter/test/painting/image_test_utils.dart +++ b/packages/flutter/test/painting/image_test_utils.dart @@ -8,8 +8,6 @@ import 'dart:ui' as ui; import 'package:flutter/foundation.dart'; import 'package:flutter/painting.dart'; -import 'package:flutter_test/flutter_test.dart'; - class TestImageProvider extends ImageProvider { TestImageProvider(this.testImage); diff --git a/packages/flutter/test/painting/system_fonts_test.dart b/packages/flutter/test/painting/system_fonts_test.dart index 8b5b31882f..3019ca9dbc 100644 --- a/packages/flutter/test/painting/system_fonts_test.dart +++ b/packages/flutter/test/painting/system_fonts_test.dart @@ -3,9 +3,7 @@ // found in the LICENSE file. import 'package:flutter/foundation.dart'; -import 'package:flutter/rendering.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/widgets.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/packages/flutter/test/painting/text_painter_test.dart b/packages/flutter/test/painting/text_painter_test.dart index 97422f923d..32bcae47d5 100644 --- a/packages/flutter/test/painting/text_painter_test.dart +++ b/packages/flutter/test/painting/text_painter_test.dart @@ -4,12 +4,9 @@ import 'dart:ui' as ui; -import 'package:flutter/painting.dart'; import 'package:flutter/widgets.dart'; import 'package:flutter_test/flutter_test.dart'; -import '../flutter_test_alternative.dart' show Fake; - void main() { test('TextPainter caret test', () { final TextPainter painter = TextPainter() diff --git a/packages/flutter/test/painting/text_span_test.dart b/packages/flutter/test/painting/text_span_test.dart index 8b91aa5176..90b0dd9778 100644 --- a/packages/flutter/test/painting/text_span_test.dart +++ b/packages/flutter/test/painting/text_span_test.dart @@ -2,7 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import 'package:flutter/painting.dart'; import 'package:flutter/widgets.dart'; import 'package:flutter_test/flutter_test.dart';