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
3e7b2085
Unverified
Commit
3e7b2085
authored
Mar 11, 2021
by
Konstantin Scheglov
Committed by
GitHub
Mar 11, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix UNNECESSARY_TYPE_CHECK_TRUE hints. (#77753)
parent
2edf6b73
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
17 deletions
+5
-17
object.dart
packages/flutter/lib/src/rendering/object.dart
+0
-1
sliver.dart
packages/flutter/lib/src/rendering/sliver.dart
+2
-3
framework.dart
packages/flutter/lib/src/widgets/framework.dart
+0
-1
gesture_detector.dart
packages/flutter/lib/src/widgets/gesture_detector.dart
+0
-6
message_codecs_test.dart
packages/flutter/test/services/message_codecs_test.dart
+3
-6
No files found.
packages/flutter/lib/src/rendering/object.dart
View file @
3e7b2085
...
...
@@ -126,7 +126,6 @@ class PaintingContext extends ClipContext {
// layer for repaint boundaries.
child
.
_layer
=
childLayer
=
OffsetLayer
();
}
else
{
assert
(
childLayer
is
OffsetLayer
);
assert
(
debugAlsoPaintedParent
||
childLayer
.
attached
);
childLayer
.
removeAllChildren
();
}
...
...
packages/flutter/lib/src/rendering/sliver.dart
View file @
3e7b2085
...
...
@@ -465,9 +465,8 @@ class SliverConstraints extends Constraints {
return
true
;
if
(
other
is
!
SliverConstraints
)
return
false
;
assert
(
other
is
SliverConstraints
&&
other
.
debugAssertIsValid
());
return
other
is
SliverConstraints
&&
other
.
axisDirection
==
axisDirection
assert
(
other
.
debugAssertIsValid
());
return
other
.
axisDirection
==
axisDirection
&&
other
.
growthDirection
==
growthDirection
&&
other
.
scrollOffset
==
scrollOffset
&&
other
.
overlap
==
overlap
...
...
packages/flutter/lib/src/widgets/framework.dart
View file @
3e7b2085
...
...
@@ -3965,7 +3965,6 @@ abstract class Element extends DiagnosticableTree implements BuildContext {
assert
(
_debugCheckStateIsActiveForAncestorLookup
());
final
InheritedElement
?
ancestor
=
_inheritedWidgets
==
null
?
null
:
_inheritedWidgets
![
T
];
if
(
ancestor
!=
null
)
{
assert
(
ancestor
is
InheritedElement
);
return
dependOnInheritedElement
(
ancestor
,
aspect:
aspect
)
as
T
;
}
_hadUnsatisfiedDependencies
=
true
;
...
...
packages/flutter/lib/src/widgets/gesture_detector.dart
View file @
3e7b2085
...
...
@@ -1328,7 +1328,6 @@ class _DefaultSemanticsGestureDelegate extends SemanticsGestureDelegate {
final
TapGestureRecognizer
?
tap
=
recognizers
[
TapGestureRecognizer
]
as
TapGestureRecognizer
?;
if
(
tap
==
null
)
return
null
;
assert
(
tap
is
TapGestureRecognizer
);
return
()
{
assert
(
tap
!=
null
);
...
...
@@ -1347,7 +1346,6 @@ class _DefaultSemanticsGestureDelegate extends SemanticsGestureDelegate {
return
null
;
return
()
{
assert
(
longPress
is
LongPressGestureRecognizer
);
if
(
longPress
.
onLongPressStart
!=
null
)
longPress
.
onLongPressStart
!(
const
LongPressStartDetails
());
if
(
longPress
.
onLongPress
!=
null
)
...
...
@@ -1366,7 +1364,6 @@ class _DefaultSemanticsGestureDelegate extends SemanticsGestureDelegate {
final
GestureDragUpdateCallback
?
horizontalHandler
=
horizontal
==
null
?
null
:
(
DragUpdateDetails
details
)
{
assert
(
horizontal
is
HorizontalDragGestureRecognizer
);
if
(
horizontal
.
onDown
!=
null
)
horizontal
.
onDown
!(
DragDownDetails
());
if
(
horizontal
.
onStart
!=
null
)
...
...
@@ -1380,7 +1377,6 @@ class _DefaultSemanticsGestureDelegate extends SemanticsGestureDelegate {
final
GestureDragUpdateCallback
?
panHandler
=
pan
==
null
?
null
:
(
DragUpdateDetails
details
)
{
assert
(
pan
is
PanGestureRecognizer
);
if
(
pan
.
onDown
!=
null
)
pan
.
onDown
!(
DragDownDetails
());
if
(
pan
.
onStart
!=
null
)
...
...
@@ -1408,7 +1404,6 @@ class _DefaultSemanticsGestureDelegate extends SemanticsGestureDelegate {
final
GestureDragUpdateCallback
?
verticalHandler
=
vertical
==
null
?
null
:
(
DragUpdateDetails
details
)
{
assert
(
vertical
is
VerticalDragGestureRecognizer
);
if
(
vertical
.
onDown
!=
null
)
vertical
.
onDown
!(
DragDownDetails
());
if
(
vertical
.
onStart
!=
null
)
...
...
@@ -1422,7 +1417,6 @@ class _DefaultSemanticsGestureDelegate extends SemanticsGestureDelegate {
final
GestureDragUpdateCallback
?
panHandler
=
pan
==
null
?
null
:
(
DragUpdateDetails
details
)
{
assert
(
pan
is
PanGestureRecognizer
);
if
(
pan
.
onDown
!=
null
)
pan
.
onDown
!(
DragDownDetails
());
if
(
pan
.
onStart
!=
null
)
...
...
packages/flutter/test/services/message_codecs_test.dart
View file @
3e7b2085
...
...
@@ -55,7 +55,6 @@ void main() {
expect
(
()
=>
method
.
decodeEnvelope
(
errorData
),
throwsA
(
predicate
((
PlatformException
e
)
=>
e
is
PlatformException
&&
e
.
code
==
'errorCode'
&&
e
.
message
==
'errorMessage'
&&
e
.
details
==
'errorDetails'
)));
...
...
@@ -71,7 +70,7 @@ void main() {
expect
(
()
=>
method
.
decodeEnvelope
(
errorData
),
throwsA
(
predicate
((
PlatformException
e
)
=>
e
is
PlatformException
&&
e
.
stacktrace
==
'errorStacktrace'
)));
e
.
stacktrace
==
'errorStacktrace'
)));
});
test
(
'should allow null error message,'
,
()
{
...
...
@@ -84,8 +83,7 @@ void main() {
()
=>
method
.
decodeEnvelope
(
errorData
),
throwsA
(
predicate
((
PlatformException
e
)
{
return
e
is
PlatformException
&&
e
.
code
==
'errorCode'
&&
return
e
.
code
==
'errorCode'
&&
e
.
message
==
null
&&
e
.
details
==
'errorDetails'
;
}),
...
...
@@ -106,7 +104,6 @@ void main() {
expect
(
()
=>
jsonMethodCodec
.
decodeEnvelope
(
errorData
),
throwsA
(
predicate
((
PlatformException
e
)
=>
e
is
PlatformException
&&
e
.
code
==
'errorCode'
&&
e
.
message
==
'errorMessage'
&&
e
.
details
==
'errorDetails'
)));
...
...
@@ -122,7 +119,7 @@ void main() {
expect
(
()
=>
jsonMethodCodec
.
decodeEnvelope
(
errorData
!),
throwsA
(
predicate
((
PlatformException
e
)
=>
e
is
PlatformException
&&
e
.
stacktrace
==
'errorStacktrace'
)));
e
.
stacktrace
==
'errorStacktrace'
)));
});
});
group
(
'JSON message codec'
,
()
{
...
...
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