Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
c4fda233
Unverified
Commit
c4fda233
authored
Dec 20, 2023
by
Michael Goderbauer
Committed by
GitHub
Dec 20, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove outdated ignores from framework (#140465)
These were not ignoring anything (anymore).
parent
e2e8bcb1
Changes
26
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
11 additions
and
60 deletions
+11
-60
analyze_snippet_code_test.dart
dev/bots/test/analyze_snippet_code_test.dart
+0
-1
controls_page.dart
...ndroid_semantics_testing/lib/src/tests/controls_page.dart
+0
-2
mouse_tracker.dart
packages/flutter/lib/src/rendering/mouse_tracker.dart
+0
-5
binding.dart
packages/flutter/lib/src/semantics/binding.dart
+0
-2
semantics.dart
packages/flutter/lib/src/semantics/semantics.dart
+0
-1
_background_isolate_binary_messenger_web.dart
...rc/services/_background_isolate_binary_messenger_web.dart
+0
-1
_html_element_view_io.dart
packages/flutter/lib/src/widgets/_html_element_view_io.dart
+0
-3
async.dart
packages/flutter/lib/src/widgets/async.dart
+1
-1
preferred_size.dart
packages/flutter/lib/src/widgets/preferred_size.dart
+0
-5
widget_inspector.dart
packages/flutter/lib/src/widgets/widget_inspector.dart
+1
-1
segmented_control_test.dart
packages/flutter/test/cupertino/segmented_control_test.dart
+0
-8
sliding_segmented_control_test.dart
...lutter/test/cupertino/sliding_segmented_control_test.dart
+0
-6
switch_test.dart
packages/flutter/test/cupertino/switch_test.dart
+0
-1
synchronous_future_test.dart
...ages/flutter/test/foundation/synchronous_future_test.dart
+1
-1
about_test.dart
packages/flutter/test/material/about_test.dart
+2
-2
ink_sparkle_test.dart
packages/flutter/test/material/ink_sparkle_test.dart
+0
-2
menu_bar_theme_test.dart
packages/flutter/test/material/menu_bar_theme_test.dart
+0
-1
menu_theme_test.dart
packages/flutter/test/material/menu_theme_test.dart
+0
-1
slider_test.dart
packages/flutter/test/material/slider_test.dart
+1
-1
tabs_test.dart
packages/flutter/test/material/tabs_test.dart
+0
-1
theme_test.dart
packages/flutter/test/material/theme_test.dart
+0
-1
time_picker_test.dart
packages/flutter/test/material/time_picker_test.dart
+2
-2
semantics_update_test.dart
packages/flutter/test/semantics/semantics_update_test.dart
+1
-1
overlay_test.dart
packages/flutter/test/widgets/overlay_test.dart
+0
-3
platform_view_test.dart
packages/flutter/test/widgets/platform_view_test.dart
+2
-2
widget_inspector_test.dart
packages/flutter/test/widgets/widget_inspector_test.dart
+0
-5
No files found.
dev/bots/test/analyze_snippet_code_test.dart
View file @
c4fda233
...
@@ -3,7 +3,6 @@
...
@@ -3,7 +3,6 @@
// found in the LICENSE file.
// found in the LICENSE file.
// we ignore these so that the format of the strings below matches what package:test prints, to make maintenance easier
// we ignore these so that the format of the strings below matches what package:test prints, to make maintenance easier
// ignore_for_file: avoid_escaping_inner_quotes
// ignore_for_file: use_raw_strings
// ignore_for_file: use_raw_strings
import
'dart:io'
;
import
'dart:io'
;
...
...
dev/integration_tests/android_semantics_testing/lib/src/tests/controls_page.dart
View file @
c4fda233
...
@@ -68,8 +68,6 @@ class _SelectionControlsPageState extends State<SelectionControlsPage> {
...
@@ -68,8 +68,6 @@ class _SelectionControlsPageState extends State<SelectionControlsPage> {
const
Checkbox
(
const
Checkbox
(
key:
checkbox2Key
,
key:
checkbox2Key
,
value:
false
,
value:
false
,
// TODO(scheglov): Requires linter fix, https://github.com/dart-lang/sdk/issues/49596.
// ignore: avoid_redundant_argument_values
onChanged:
null
,
onChanged:
null
,
),
),
],
],
...
...
packages/flutter/lib/src/rendering/mouse_tracker.dart
View file @
c4fda233
...
@@ -2,11 +2,6 @@
...
@@ -2,11 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// found in the LICENSE file.
// This library intentionally uses the LinkedHashMap constructor to declare that
// entries will be ordered. Using collection literals for this requires casting the
// resulting map, which has a runtime cost.
// ignore_for_file: prefer_collection_literals
import
'dart:collection'
show
LinkedHashMap
;
import
'dart:collection'
show
LinkedHashMap
;
import
'dart:ui'
;
import
'dart:ui'
;
...
...
packages/flutter/lib/src/semantics/binding.dart
View file @
c4fda233
...
@@ -2,7 +2,6 @@
...
@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// found in the LICENSE file.
// ignore: deprecated_member_use
import
'dart:ui'
as
ui
show
AccessibilityFeatures
,
SemanticsActionEvent
,
SemanticsUpdateBuilder
;
import
'dart:ui'
as
ui
show
AccessibilityFeatures
,
SemanticsActionEvent
,
SemanticsUpdateBuilder
;
import
'package:flutter/foundation.dart'
;
import
'package:flutter/foundation.dart'
;
...
@@ -10,7 +9,6 @@ import 'package:flutter/services.dart';
...
@@ -10,7 +9,6 @@ import 'package:flutter/services.dart';
import
'debug.dart'
;
import
'debug.dart'
;
// ignore: deprecated_member_use
export
'dart:ui'
show
AccessibilityFeatures
,
SemanticsActionEvent
,
SemanticsUpdateBuilder
;
export
'dart:ui'
show
AccessibilityFeatures
,
SemanticsActionEvent
,
SemanticsUpdateBuilder
;
/// The glue between the semantics layer and the Flutter engine.
/// The glue between the semantics layer and the Flutter engine.
...
...
packages/flutter/lib/src/semantics/semantics.dart
View file @
c4fda233
...
@@ -3,7 +3,6 @@
...
@@ -3,7 +3,6 @@
// found in the LICENSE file.
// found in the LICENSE file.
import
'dart:math'
as
math
;
import
'dart:math'
as
math
;
// ignore: deprecated_member_use
import
'dart:ui'
show
Offset
,
Rect
,
SemanticsAction
,
SemanticsFlag
,
SemanticsUpdate
,
SemanticsUpdateBuilder
,
StringAttribute
,
TextDirection
;
import
'dart:ui'
show
Offset
,
Rect
,
SemanticsAction
,
SemanticsFlag
,
SemanticsUpdate
,
SemanticsUpdateBuilder
,
StringAttribute
,
TextDirection
;
import
'package:collection/collection.dart'
;
import
'package:collection/collection.dart'
;
...
...
packages/flutter/lib/src/services/_background_isolate_binary_messenger_web.dart
View file @
c4fda233
...
@@ -4,7 +4,6 @@
...
@@ -4,7 +4,6 @@
import
'binding.dart'
;
import
'binding.dart'
;
// ignore: avoid_classes_with_only_static_members
/// Stand-in for non-web platforms' [BackgroundIsolateBinaryMessenger].
/// Stand-in for non-web platforms' [BackgroundIsolateBinaryMessenger].
class
BackgroundIsolateBinaryMessenger
{
class
BackgroundIsolateBinaryMessenger
{
/// Throws an [UnsupportedError].
/// Throws an [UnsupportedError].
...
...
packages/flutter/lib/src/widgets/_html_element_view_io.dart
View file @
c4fda233
...
@@ -2,9 +2,6 @@
...
@@ -2,9 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// found in the LICENSE file.
// ignore_for_file: prefer_const_constructors_in_immutables
// ignore_for_file: avoid_unused_constructor_parameters
import
'framework.dart'
;
import
'framework.dart'
;
import
'platform_view.dart'
;
import
'platform_view.dart'
;
...
...
packages/flutter/lib/src/widgets/async.dart
View file @
c4fda233
...
@@ -94,7 +94,7 @@ abstract class StreamBuilderBase<T, S> extends StatefulWidget {
...
@@ -94,7 +94,7 @@ abstract class StreamBuilderBase<T, S> extends StatefulWidget {
/// State for [StreamBuilderBase].
/// State for [StreamBuilderBase].
class
_StreamBuilderBaseState
<
T
,
S
>
extends
State
<
StreamBuilderBase
<
T
,
S
>>
{
class
_StreamBuilderBaseState
<
T
,
S
>
extends
State
<
StreamBuilderBase
<
T
,
S
>>
{
StreamSubscription
<
T
>?
_subscription
;
// ignore: cancel_subscriptions
StreamSubscription
<
T
>?
_subscription
;
late
S
_summary
;
late
S
_summary
;
@override
@override
...
...
packages/flutter/lib/src/widgets/preferred_size.dart
View file @
c4fda233
...
@@ -21,11 +21,6 @@ import 'framework.dart';
...
@@ -21,11 +21,6 @@ import 'framework.dart';
/// than [Widget] as the type of their `child` property.
/// than [Widget] as the type of their `child` property.
///
///
/// Use [PreferredSize] to give a preferred size to an arbitrary widget.
/// Use [PreferredSize] to give a preferred size to an arbitrary widget.
// (We ignore `avoid_implementing_value_types` here because the superclass
// doesn't really implement `operator ==`, it just overrides it to _prevent_ it
// from being implemented, which is the exact opposite of the spirit of the
// `avoid_implementing_value_types` lint.)
// ignore: avoid_implementing_value_types
abstract
class
PreferredSizeWidget
implements
Widget
{
abstract
class
PreferredSizeWidget
implements
Widget
{
/// The size this widget would prefer if it were otherwise unconstrained.
/// The size this widget would prefer if it were otherwise unconstrained.
///
///
...
...
packages/flutter/lib/src/widgets/widget_inspector.dart
View file @
c4fda233
...
@@ -3380,7 +3380,7 @@ class _Location {
...
@@ -3380,7 +3380,7 @@ class _Location {
required
this
.
file
,
required
this
.
file
,
required
this
.
line
,
required
this
.
line
,
required
this
.
column
,
required
this
.
column
,
// ignore: unused_element
, unused_element_parameter
// ignore: unused_element
this
.
name
,
this
.
name
,
});
});
...
...
packages/flutter/test/cupertino/segmented_control_test.dart
View file @
c4fda233
...
@@ -61,28 +61,20 @@ int getChildCount(WidgetTester tester) {
...
@@ -61,28 +61,20 @@ int getChildCount(WidgetTester tester) {
}
}
ui
.
RRect
getSurroundingRect
(
WidgetTester
tester
,
{
int
child
=
0
})
{
ui
.
RRect
getSurroundingRect
(
WidgetTester
tester
,
{
int
child
=
0
})
{
// Using dynamic so the test can access private classes.
// ignore: avoid_dynamic_calls
return
((
getRenderSegmentedControl
(
tester
)
as
RenderBoxContainerDefaultsMixin
<
RenderBox
,
ContainerBoxParentData
<
RenderBox
>>)
return
((
getRenderSegmentedControl
(
tester
)
as
RenderBoxContainerDefaultsMixin
<
RenderBox
,
ContainerBoxParentData
<
RenderBox
>>)
.
getChildrenAsList
()[
child
].
parentData
!
as
dynamic
).
surroundingRect
as
ui
.
RRect
;
.
getChildrenAsList
()[
child
].
parentData
!
as
dynamic
).
surroundingRect
as
ui
.
RRect
;
}
}
Size
getChildSize
(
WidgetTester
tester
,
{
int
child
=
0
})
{
Size
getChildSize
(
WidgetTester
tester
,
{
int
child
=
0
})
{
// Using dynamic so the test can access private classes.
// ignore: avoid_dynamic_calls
return
(
getRenderSegmentedControl
(
tester
)
as
RenderBoxContainerDefaultsMixin
<
RenderBox
,
ContainerBoxParentData
<
RenderBox
>>)
return
(
getRenderSegmentedControl
(
tester
)
as
RenderBoxContainerDefaultsMixin
<
RenderBox
,
ContainerBoxParentData
<
RenderBox
>>)
.
getChildrenAsList
()[
child
].
size
;
.
getChildrenAsList
()[
child
].
size
;
}
}
Color
getBorderColor
(
WidgetTester
tester
)
{
Color
getBorderColor
(
WidgetTester
tester
)
{
// Using dynamic so the test can access a private class.
// ignore: avoid_dynamic_calls
return
(
getRenderSegmentedControl
(
tester
)
as
dynamic
).
borderColor
as
Color
;
return
(
getRenderSegmentedControl
(
tester
)
as
dynamic
).
borderColor
as
Color
;
}
}
int
?
getSelectedIndex
(
WidgetTester
tester
)
{
int
?
getSelectedIndex
(
WidgetTester
tester
)
{
// Using dynamic so the test can access a private class.
// ignore: avoid_dynamic_calls
return
(
getRenderSegmentedControl
(
tester
)
as
dynamic
).
selectedIndex
as
int
?;
return
(
getRenderSegmentedControl
(
tester
)
as
dynamic
).
selectedIndex
as
int
?;
}
}
...
...
packages/flutter/test/cupertino/sliding_segmented_control_test.dart
View file @
c4fda233
...
@@ -34,20 +34,14 @@ Rect currentUnscaledThumbRect(WidgetTester tester, { bool useGlobalCoordinate =
...
@@ -34,20 +34,14 @@ Rect currentUnscaledThumbRect(WidgetTester tester, { bool useGlobalCoordinate =
}
}
int
?
getHighlightedIndex
(
WidgetTester
tester
)
{
int
?
getHighlightedIndex
(
WidgetTester
tester
)
{
// Using dynamic to access private class in test.
// ignore: avoid_dynamic_calls
return
(
getRenderSegmentedControl
(
tester
)
as
dynamic
).
highlightedIndex
as
int
?;
return
(
getRenderSegmentedControl
(
tester
)
as
dynamic
).
highlightedIndex
as
int
?;
}
}
Color
getThumbColor
(
WidgetTester
tester
)
{
Color
getThumbColor
(
WidgetTester
tester
)
{
// Using dynamic to access private class in test.
// ignore: avoid_dynamic_calls
return
(
getRenderSegmentedControl
(
tester
)
as
dynamic
).
thumbColor
as
Color
;
return
(
getRenderSegmentedControl
(
tester
)
as
dynamic
).
thumbColor
as
Color
;
}
}
double
currentThumbScale
(
WidgetTester
tester
)
{
double
currentThumbScale
(
WidgetTester
tester
)
{
// Using dynamic to access private class in test.
// ignore: avoid_dynamic_calls
return
(
getRenderSegmentedControl
(
tester
)
as
dynamic
).
thumbScale
as
double
;
return
(
getRenderSegmentedControl
(
tester
)
as
dynamic
).
thumbScale
as
double
;
}
}
...
...
packages/flutter/test/cupertino/switch_test.dart
View file @
c4fda233
...
@@ -490,7 +490,6 @@ void main() {
...
@@ -490,7 +490,6 @@ void main() {
await
gesture
.
up
();
await
gesture
.
up
();
await
tester
.
pump
();
await
tester
.
pump
();
expect
(
value
,
isFalse
);
expect
(
value
,
isFalse
);
// ignore: avoid_dynamic_calls
final
CurvedAnimation
position
=
(
tester
.
state
(
find
.
byType
(
CupertinoSwitch
))
as
dynamic
).
position
as
CurvedAnimation
;
final
CurvedAnimation
position
=
(
tester
.
state
(
find
.
byType
(
CupertinoSwitch
))
as
dynamic
).
position
as
CurvedAnimation
;
expect
(
position
.
value
,
lessThan
(
0.5
));
expect
(
position
.
value
,
lessThan
(
0.5
));
await
tester
.
pump
();
await
tester
.
pump
();
...
...
packages/flutter/test/foundation/synchronous_future_test.dart
View file @
c4fda233
...
@@ -40,7 +40,7 @@ void main() {
...
@@ -40,7 +40,7 @@ void main() {
Object
?
exception
;
Object
?
exception
;
try
{
try
{
await
future
.
whenComplete
(()
{
// ignore: void_checks, https://github.com/dart-lang/linter/issues/1675
await
future
.
whenComplete
(()
{
throw
ArgumentError
();
throw
ArgumentError
();
});
});
// Unreached.
// Unreached.
...
...
packages/flutter/test/material/about_test.dart
View file @
c4fda233
...
@@ -1429,7 +1429,7 @@ void main() {
...
@@ -1429,7 +1429,7 @@ void main() {
await
tester
.
pump
(
const
Duration
(
seconds:
2
));
await
tester
.
pump
(
const
Duration
(
seconds:
2
));
final
Finder
finder
=
find
.
byWidgetPredicate
((
Widget
widget
)
=>
widget
.
runtimeType
.
toString
()
==
'_PackagesView'
);
final
Finder
finder
=
find
.
byWidgetPredicate
((
Widget
widget
)
=>
widget
.
runtimeType
.
toString
()
==
'_PackagesView'
);
// force the stream to complete (has to be done in a runAsync block since it's areal async process)
// force the stream to complete (has to be done in a runAsync block since it's areal async process)
await
tester
.
runAsync
(()
=>
(
tester
.
firstState
(
finder
)
as
dynamic
).
licenses
as
Future
<
dynamic
>);
// ignore: avoid_dynamic_calls
await
tester
.
runAsync
(()
=>
(
tester
.
firstState
(
finder
)
as
dynamic
).
licenses
as
Future
<
dynamic
>);
expect
(
tester
.
takeException
().
toString
(),
'Exception: Injected failure'
);
expect
(
tester
.
takeException
().
toString
(),
'Exception: Injected failure'
);
await
tester
.
pumpAndSettle
();
await
tester
.
pumpAndSettle
();
expect
(
tester
.
takeException
().
toString
(),
'Exception: Injected failure'
);
expect
(
tester
.
takeException
().
toString
(),
'Exception: Injected failure'
);
...
@@ -1452,7 +1452,7 @@ void main() {
...
@@ -1452,7 +1452,7 @@ void main() {
await
tester
.
pump
(
const
Duration
(
seconds:
2
));
await
tester
.
pump
(
const
Duration
(
seconds:
2
));
final
Finder
finder
=
find
.
byWidgetPredicate
((
Widget
widget
)
=>
widget
.
runtimeType
.
toString
()
==
'_PackagesView'
);
final
Finder
finder
=
find
.
byWidgetPredicate
((
Widget
widget
)
=>
widget
.
runtimeType
.
toString
()
==
'_PackagesView'
);
// force the stream to complete (has to be done in a runAsync block since it's areal async process)
// force the stream to complete (has to be done in a runAsync block since it's areal async process)
await
tester
.
runAsync
(()
=>
(
tester
.
firstState
(
finder
)
as
dynamic
).
licenses
as
Future
<
dynamic
>);
// ignore: avoid_dynamic_calls
await
tester
.
runAsync
(()
=>
(
tester
.
firstState
(
finder
)
as
dynamic
).
licenses
as
Future
<
dynamic
>);
expect
(
tester
.
takeException
().
toString
(),
'Exception: Injected failure'
);
expect
(
tester
.
takeException
().
toString
(),
'Exception: Injected failure'
);
await
tester
.
pumpAndSettle
();
await
tester
.
pumpAndSettle
();
expect
(
tester
.
takeException
().
toString
(),
'Exception: Injected failure'
);
expect
(
tester
.
takeException
().
toString
(),
'Exception: Injected failure'
);
...
...
packages/flutter/test/material/ink_sparkle_test.dart
View file @
c4fda233
...
@@ -52,12 +52,10 @@ void main() {
...
@@ -52,12 +52,10 @@ void main() {
final
MaterialInkController
material
=
Material
.
of
(
tester
.
element
(
buttonFinder
));
final
MaterialInkController
material
=
Material
.
of
(
tester
.
element
(
buttonFinder
));
expect
(
material
,
paintsExactlyCountTimes
(
#drawRect
,
1
));
expect
(
material
,
paintsExactlyCountTimes
(
#drawRect
,
1
));
// ignore: avoid_dynamic_calls
expect
((
material
as
dynamic
).
debugInkFeatures
,
hasLength
(
1
));
expect
((
material
as
dynamic
).
debugInkFeatures
,
hasLength
(
1
));
await
tester
.
pumpAndSettle
();
await
tester
.
pumpAndSettle
();
// ink feature is disposed.
// ink feature is disposed.
// ignore: avoid_dynamic_calls
expect
((
material
as
dynamic
).
debugInkFeatures
,
isEmpty
);
expect
((
material
as
dynamic
).
debugInkFeatures
,
isEmpty
);
},
},
skip:
kIsWeb
,
// [intended] shaders are not yet supported for web.
skip:
kIsWeb
,
// [intended] shaders are not yet supported for web.
...
...
packages/flutter/test/material/menu_bar_theme_test.dart
View file @
c4fda233
...
@@ -10,7 +10,6 @@ void main() {
...
@@ -10,7 +10,6 @@ void main() {
Finder
findMenuPanels
(
Axis
orientation
)
{
Finder
findMenuPanels
(
Axis
orientation
)
{
return
find
.
byWidgetPredicate
((
Widget
widget
)
{
return
find
.
byWidgetPredicate
((
Widget
widget
)
{
// ignore: avoid_dynamic_calls
return
widget
.
runtimeType
.
toString
()
==
'_MenuPanel'
&&
(
widget
as
dynamic
).
orientation
==
orientation
;
return
widget
.
runtimeType
.
toString
()
==
'_MenuPanel'
&&
(
widget
as
dynamic
).
orientation
==
orientation
;
});
});
}
}
...
...
packages/flutter/test/material/menu_theme_test.dart
View file @
c4fda233
...
@@ -11,7 +11,6 @@ void main() {
...
@@ -11,7 +11,6 @@ void main() {
Finder
findMenuPanels
(
Axis
orientation
)
{
Finder
findMenuPanels
(
Axis
orientation
)
{
return
find
.
byWidgetPredicate
((
Widget
widget
)
{
return
find
.
byWidgetPredicate
((
Widget
widget
)
{
// ignore: avoid_dynamic_calls
return
widget
.
runtimeType
.
toString
()
==
'_MenuPanel'
&&
(
widget
as
dynamic
).
orientation
==
orientation
;
return
widget
.
runtimeType
.
toString
()
==
'_MenuPanel'
&&
(
widget
as
dynamic
).
orientation
==
orientation
;
});
});
}
}
...
...
packages/flutter/test/material/slider_test.dart
View file @
c4fda233
...
@@ -3418,7 +3418,7 @@ void main() {
...
@@ -3418,7 +3418,7 @@ void main() {
await
tester
.
pumpAndSettle
();
await
tester
.
pumpAndSettle
();
expect
(
value
,
equals
(
0.5
));
expect
(
value
,
equals
(
0.5
));
// Get FocusNode from the state of the slider to include auto-generated FocusNode.
// Get FocusNode from the state of the slider to include auto-generated FocusNode.
// ignore:
avoid_dynamic_calls,
invalid_assignment
// ignore: invalid_assignment
final
FocusNode
focusNode
=
(
tester
.
firstState
(
find
.
byType
(
Slider
))
as
dynamic
).
focusNode
;
final
FocusNode
focusNode
=
(
tester
.
firstState
(
find
.
byType
(
Slider
))
as
dynamic
).
focusNode
;
// The slider does not have focus.
// The slider does not have focus.
expect
(
focusNode
.
hasFocus
,
false
);
expect
(
focusNode
.
hasFocus
,
false
);
...
...
packages/flutter/test/material/tabs_test.dart
View file @
c4fda233
...
@@ -6482,7 +6482,6 @@ void main() {
...
@@ -6482,7 +6482,6 @@ void main() {
// Test painter's divider color.
// Test painter's divider color.
final
CustomPaint
paint
=
tester
.
widget
<
CustomPaint
>(
find
.
byType
(
CustomPaint
).
last
);
final
CustomPaint
paint
=
tester
.
widget
<
CustomPaint
>(
find
.
byType
(
CustomPaint
).
last
);
// ignore: avoid_dynamic_calls
expect
((
paint
.
painter
as
dynamic
).
dividerColor
,
dividerColor
);
expect
((
paint
.
painter
as
dynamic
).
dividerColor
,
dividerColor
);
});
});
...
...
packages/flutter/test/material/theme_test.dart
View file @
c4fda233
...
@@ -1001,7 +1001,6 @@ class Test extends StatelessWidget {
...
@@ -1001,7 +1001,6 @@ class Test extends StatelessWidget {
/// This class exists only to make sure that we test all the properties of the
/// This class exists only to make sure that we test all the properties of the
/// [TextStyle] class. If a property is added/removed/renamed, the analyzer will
/// [TextStyle] class. If a property is added/removed/renamed, the analyzer will
/// complain that this class has incorrect overrides.
/// complain that this class has incorrect overrides.
// ignore: avoid_implementing_value_types
class
_TextStyleProxy
implements
TextStyle
{
class
_TextStyleProxy
implements
TextStyle
{
_TextStyleProxy
(
this
.
_delegate
);
_TextStyleProxy
(
this
.
_delegate
);
...
...
packages/flutter/test/material/time_picker_test.dart
View file @
c4fda233
...
@@ -602,7 +602,7 @@ void main() {
...
@@ -602,7 +602,7 @@ void main() {
render
=
tester
.
renderObject
(
render
=
tester
.
renderObject
(
find
.
byWidgetPredicate
((
Widget
w
)
=>
'
${w.runtimeType}
'
==
'_DayPeriodInputPadding'
),
find
.
byWidgetPredicate
((
Widget
w
)
=>
'
${w.runtimeType}
'
==
'_DayPeriodInputPadding'
),
);
);
expect
((
render
as
dynamic
).
orientation
,
Orientation
.
landscape
);
// ignore: avoid_dynamic_calls
expect
((
render
as
dynamic
).
orientation
,
Orientation
.
landscape
);
});
});
testWidgets
(
'setting orientation should override MediaQuery orientation'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'setting orientation should override MediaQuery orientation'
,
(
WidgetTester
tester
)
async
{
...
@@ -616,7 +616,7 @@ void main() {
...
@@ -616,7 +616,7 @@ void main() {
final
RenderObject
render
=
tester
.
renderObject
(
final
RenderObject
render
=
tester
.
renderObject
(
find
.
byWidgetPredicate
((
Widget
w
)
=>
'
${w.runtimeType}
'
==
'_DayPeriodInputPadding'
),
find
.
byWidgetPredicate
((
Widget
w
)
=>
'
${w.runtimeType}
'
==
'_DayPeriodInputPadding'
),
);
);
expect
((
render
as
dynamic
).
orientation
,
Orientation
.
landscape
);
// ignore: avoid_dynamic_calls
expect
((
render
as
dynamic
).
orientation
,
Orientation
.
landscape
);
});
});
testWidgets
(
'builder parameter'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'builder parameter'
,
(
WidgetTester
tester
)
async
{
...
...
packages/flutter/test/semantics/semantics_update_test.dart
View file @
c4fda233
...
@@ -158,7 +158,7 @@ void main() {
...
@@ -158,7 +158,7 @@ void main() {
'properties: SemanticsProperties, '
'properties: SemanticsProperties, '
'attributedLabel: "label" [SpellOutStringAttribute(TextRange(start: 0, end: 5))], '
'attributedLabel: "label" [SpellOutStringAttribute(TextRange(start: 0, end: 5))], '
'attributedValue: "value" [LocaleStringAttribute(TextRange(start: 0, end: 5), en-MX)], '
'attributedValue: "value" [LocaleStringAttribute(TextRange(start: 0, end: 5), en-MX)], '
'attributedHint: "hint" [SpellOutStringAttribute(TextRange(start: 1, end: 2))]'
// ignore: missing_whitespace_between_adjacent_strings
'attributedHint: "hint" [SpellOutStringAttribute(TextRange(start: 1, end: 2))]'
// ignore: missing_whitespace_between_adjacent_strings
')'
,
')'
,
);
);
...
...
packages/flutter/test/widgets/overlay_test.dart
View file @
c4fda233
...
@@ -1193,7 +1193,6 @@ void main() {
...
@@ -1193,7 +1193,6 @@ void main() {
// By default, clipBehavior should be Clip.hardEdge
// By default, clipBehavior should be Clip.hardEdge
final
RenderObject
renderObject
=
tester
.
renderObject
(
find
.
byType
(
Overlay
));
final
RenderObject
renderObject
=
tester
.
renderObject
(
find
.
byType
(
Overlay
));
// ignore: avoid_dynamic_calls
expect
((
renderObject
as
dynamic
).
clipBehavior
,
equals
(
Clip
.
hardEdge
));
expect
((
renderObject
as
dynamic
).
clipBehavior
,
equals
(
Clip
.
hardEdge
));
for
(
final
Clip
clip
in
Clip
.
values
)
{
for
(
final
Clip
clip
in
Clip
.
values
)
{
...
@@ -1211,7 +1210,6 @@ void main() {
...
@@ -1211,7 +1210,6 @@ void main() {
),
),
);
);
// ignore: avoid_dynamic_calls
expect
((
renderObject
as
dynamic
).
clipBehavior
,
clip
);
expect
((
renderObject
as
dynamic
).
clipBehavior
,
clip
);
bool
visited
=
false
;
bool
visited
=
false
;
renderObject
.
visitChildren
((
RenderObject
child
)
{
renderObject
.
visitChildren
((
RenderObject
child
)
{
...
@@ -1249,7 +1247,6 @@ void main() {
...
@@ -1249,7 +1247,6 @@ void main() {
),
),
);
);
final
RenderObject
renderObject
=
tester
.
renderObject
(
find
.
byType
(
Overlay
));
final
RenderObject
renderObject
=
tester
.
renderObject
(
find
.
byType
(
Overlay
));
// ignore: avoid_dynamic_calls
expect
((
renderObject
as
dynamic
).
paint
,
paints
expect
((
renderObject
as
dynamic
).
paint
,
paints
..
save
()
..
save
()
..
clipRect
(
rect:
const
Rect
.
fromLTWH
(
0.0
,
0.0
,
800.0
,
600.0
))
..
clipRect
(
rect:
const
Rect
.
fromLTWH
(
0.0
,
0.0
,
800.0
,
600.0
))
...
...
packages/flutter/test/widgets/platform_view_test.dart
View file @
c4fda233
...
@@ -2212,7 +2212,7 @@ void main() {
...
@@ -2212,7 +2212,7 @@ void main() {
),
),
);
);
// casting to dynamic is required since the state class is private.
// casting to dynamic is required since the state class is private.
// ignore:
avoid_dynamic_calls,
invalid_assignment
// ignore: invalid_assignment
final
FocusNode
node
=
(
tester
.
state
(
find
.
byType
(
UiKitView
))
as
dynamic
).
focusNode
;
final
FocusNode
node
=
(
tester
.
state
(
find
.
byType
(
UiKitView
))
as
dynamic
).
focusNode
;
expect
(()
=>
ChangeNotifier
.
debugAssertNotDisposed
(
node
),
isNot
(
throwsAssertionError
));
expect
(()
=>
ChangeNotifier
.
debugAssertNotDisposed
(
node
),
isNot
(
throwsAssertionError
));
await
tester
.
pumpWidget
(
await
tester
.
pumpWidget
(
...
@@ -3149,7 +3149,7 @@ void main() {
...
@@ -3149,7 +3149,7 @@ void main() {
),
),
);
);
// casting to dynamic is required since the state class is private.
// casting to dynamic is required since the state class is private.
// ignore:
avoid_dynamic_calls,
invalid_assignment
// ignore: invalid_assignment
final
FocusNode
node
=
(
tester
.
state
(
find
.
byType
(
AppKitView
))
as
dynamic
).
focusNode
;
final
FocusNode
node
=
(
tester
.
state
(
find
.
byType
(
AppKitView
))
as
dynamic
).
focusNode
;
expect
(()
=>
ChangeNotifier
.
debugAssertNotDisposed
(
node
),
isNot
(
throwsAssertionError
));
expect
(()
=>
ChangeNotifier
.
debugAssertNotDisposed
(
node
),
isNot
(
throwsAssertionError
));
await
tester
.
pumpWidget
(
await
tester
.
pumpWidget
(
...
...
packages/flutter/test/widgets/widget_inspector_test.dart
View file @
c4fda233
...
@@ -400,7 +400,6 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService {
...
@@ -400,7 +400,6 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService {
await
tester
.
pump
();
await
tester
.
pump
();
// Tap intercepted by the inspector
// Tap intercepted by the inspector
expect
(
log
,
equals
(<
String
>[]));
expect
(
log
,
equals
(<
String
>[]));
// ignore: avoid_dynamic_calls
expect
(
expect
(
paragraphText
(
paragraphText
(
WidgetInspectorService
.
instance
.
selection
.
current
!
as
RenderParagraph
,
WidgetInspectorService
.
instance
.
selection
.
current
!
as
RenderParagraph
,
...
@@ -421,7 +420,6 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService {
...
@@ -421,7 +420,6 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService {
expect
(
log
,
equals
(<
String
>[
'bottom'
]));
expect
(
log
,
equals
(<
String
>[
'bottom'
]));
log
.
clear
();
log
.
clear
();
// Ensure the inspector selection has not changed to bottom.
// Ensure the inspector selection has not changed to bottom.
// ignore: avoid_dynamic_calls
expect
(
expect
(
paragraphText
(
paragraphText
(
WidgetInspectorService
.
instance
.
selection
.
current
!
as
RenderParagraph
,
WidgetInspectorService
.
instance
.
selection
.
current
!
as
RenderParagraph
,
...
@@ -437,7 +435,6 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService {
...
@@ -437,7 +435,6 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService {
await
tester
.
tap
(
find
.
text
(
'BOTTOM'
),
warnIfMissed:
false
);
await
tester
.
tap
(
find
.
text
(
'BOTTOM'
),
warnIfMissed:
false
);
expect
(
log
,
equals
(<
String
>[]));
expect
(
log
,
equals
(<
String
>[]));
log
.
clear
();
log
.
clear
();
// ignore: avoid_dynamic_calls
expect
(
expect
(
paragraphText
(
paragraphText
(
WidgetInspectorService
.
instance
.
selection
.
current
!
as
RenderParagraph
,
WidgetInspectorService
.
instance
.
selection
.
current
!
as
RenderParagraph
,
...
@@ -608,7 +605,6 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService {
...
@@ -608,7 +605,6 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService {
await
tester
.
longPress
(
find
.
byKey
(
clickTarget
),
warnIfMissed:
false
);
await
tester
.
longPress
(
find
.
byKey
(
clickTarget
),
warnIfMissed:
false
);
// The object with width 95.0 wins over the object with width 94.0 because
// The object with width 95.0 wins over the object with width 94.0 because
// the subtree with width 94.0 is offstage.
// the subtree with width 94.0 is offstage.
// ignore: avoid_dynamic_calls
expect
(
expect
(
WidgetInspectorService
.
instance
.
selection
.
current
?.
semanticBounds
.
width
,
WidgetInspectorService
.
instance
.
selection
.
current
?.
semanticBounds
.
width
,
equals
(
95.0
),
equals
(
95.0
),
...
@@ -616,7 +612,6 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService {
...
@@ -616,7 +612,6 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService {
// Exactly 2 out of the 3 text elements should be in the candidate list of
// Exactly 2 out of the 3 text elements should be in the candidate list of
// objects to select as only 2 are onstage.
// objects to select as only 2 are onstage.
// ignore: avoid_dynamic_calls
expect
(
expect
(
WidgetInspectorService
.
instance
.
selection
.
candidates
WidgetInspectorService
.
instance
.
selection
.
candidates
.
whereType
<
RenderParagraph
>()
.
whereType
<
RenderParagraph
>()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment