forked from firka/flutter
Remove "unnecessary" imports in test/widgets (#79608)
This commit is contained in:
@@ -7,7 +7,6 @@ import 'package:flutter/gestures.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/rendering.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
typedef PostInvokeCallback = void Function({Action<Intent> action, Intent intent, ActionDispatcher dispatcher});
|
||||
|
||||
@@ -4,9 +4,7 @@
|
||||
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
|
||||
class TestLeftIntent extends Intent {}
|
||||
class TestRightIntent extends Intent {}
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
class StateMarker extends StatefulWidget {
|
||||
const StateMarker({ Key? key, this.child }) : super(key: key);
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/rendering.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets('SliverFillViewport control test', (WidgetTester tester) async {
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
class TestWidget extends StatefulWidget {
|
||||
const TestWidget({
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:flutter/rendering.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class TestStatefulWidget extends StatefulWidget {
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:flutter/rendering.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
const BoxDecoration kBoxDecorationA = BoxDecoration(
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
@TestOn('!chrome')
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets('Centered text', (WidgetTester tester) async {
|
||||
|
||||
@@ -7,7 +7,6 @@ import 'package:flutter/gestures.dart' show PointerDeviceKind;
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/rendering.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
class MockClipboard {
|
||||
MockClipboard({
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:flutter/rendering.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
void main() {
|
||||
|
||||
@@ -9,7 +9,6 @@ import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/gestures.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
import '../rendering/mock_canvas.dart';
|
||||
import 'semantics_tester.dart';
|
||||
|
||||
@@ -5,10 +5,7 @@
|
||||
import 'dart:math' as math;
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/rendering.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter/gestures.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets('Scrollable scaled up', (WidgetTester tester) async {
|
||||
|
||||
@@ -7,7 +7,6 @@ import 'dart:math' as math;
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:flutter/rendering.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets('toString control test', (WidgetTester tester) async {
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/rendering.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ import 'dart:async';
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/rendering.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@ import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/gestures.dart' show DragStartBehavior;
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/rendering.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
import 'widget_inspector_test_utils.dart';
|
||||
@@ -1937,7 +1936,7 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService {
|
||||
_CreationLocation location = knownLocations[id]!;
|
||||
expect(location.file, equals(file));
|
||||
// ClockText widget.
|
||||
expect(location.line, equals(54));
|
||||
expect(location.line, equals(53));
|
||||
expect(location.column, equals(9));
|
||||
expect(count, equals(1));
|
||||
|
||||
@@ -1946,7 +1945,7 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService {
|
||||
location = knownLocations[id]!;
|
||||
expect(location.file, equals(file));
|
||||
// Text widget in _ClockTextState build method.
|
||||
expect(location.line, equals(92));
|
||||
expect(location.line, equals(91));
|
||||
expect(location.column, equals(12));
|
||||
expect(count, equals(1));
|
||||
|
||||
@@ -1971,7 +1970,7 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService {
|
||||
location = knownLocations[id]!;
|
||||
expect(location.file, equals(file));
|
||||
// ClockText widget.
|
||||
expect(location.line, equals(54));
|
||||
expect(location.line, equals(53));
|
||||
expect(location.column, equals(9));
|
||||
expect(count, equals(3)); // 3 clock widget instances rebuilt.
|
||||
|
||||
@@ -1980,7 +1979,7 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService {
|
||||
location = knownLocations[id]!;
|
||||
expect(location.file, equals(file));
|
||||
// Text widget in _ClockTextState build method.
|
||||
expect(location.line, equals(92));
|
||||
expect(location.line, equals(91));
|
||||
expect(location.column, equals(12));
|
||||
expect(count, equals(3)); // 3 clock widget instances rebuilt.
|
||||
|
||||
|
||||
@@ -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 'dart:async';
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:flutter/rendering.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
import '../rendering/mock_canvas.dart';
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@ import 'package:flutter_tools/src/dart/pub.dart';
|
||||
import 'package:flutter_tools/src/reporting/reporting.dart';
|
||||
import 'package:flutter_tools/src/version.dart';
|
||||
import 'package:flutter_tools/src/globals_null_migrated.dart' as globals;
|
||||
import 'package:process/process.dart';
|
||||
|
||||
import 'context.dart';
|
||||
import 'fake_http_client.dart';
|
||||
|
||||
Reference in New Issue
Block a user