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 {
...
@@ -126,7 +126,6 @@ class PaintingContext extends ClipContext {
// layer for repaint boundaries.
// layer for repaint boundaries.
child
.
_layer
=
childLayer
=
OffsetLayer
();
child
.
_layer
=
childLayer
=
OffsetLayer
();
}
else
{
}
else
{
assert
(
childLayer
is
OffsetLayer
);
assert
(
debugAlsoPaintedParent
||
childLayer
.
attached
);
assert
(
debugAlsoPaintedParent
||
childLayer
.
attached
);
childLayer
.
removeAllChildren
();
childLayer
.
removeAllChildren
();
}
}
...
...
packages/flutter/lib/src/rendering/sliver.dart
View file @
3e7b2085
...
@@ -465,9 +465,8 @@ class SliverConstraints extends Constraints {
...
@@ -465,9 +465,8 @@ class SliverConstraints extends Constraints {
return
true
;
return
true
;
if
(
other
is
!
SliverConstraints
)
if
(
other
is
!
SliverConstraints
)
return
false
;
return
false
;
assert
(
other
is
SliverConstraints
&&
other
.
debugAssertIsValid
());
assert
(
other
.
debugAssertIsValid
());
return
other
is
SliverConstraints
return
other
.
axisDirection
==
axisDirection
&&
other
.
axisDirection
==
axisDirection
&&
other
.
growthDirection
==
growthDirection
&&
other
.
growthDirection
==
growthDirection
&&
other
.
scrollOffset
==
scrollOffset
&&
other
.
scrollOffset
==
scrollOffset
&&
other
.
overlap
==
overlap
&&
other
.
overlap
==
overlap
...
...
packages/flutter/lib/src/widgets/framework.dart
View file @
3e7b2085
...
@@ -3965,7 +3965,6 @@ abstract class Element extends DiagnosticableTree implements BuildContext {
...
@@ -3965,7 +3965,6 @@ abstract class Element extends DiagnosticableTree implements BuildContext {
assert
(
_debugCheckStateIsActiveForAncestorLookup
());
assert
(
_debugCheckStateIsActiveForAncestorLookup
());
final
InheritedElement
?
ancestor
=
_inheritedWidgets
==
null
?
null
:
_inheritedWidgets
![
T
];
final
InheritedElement
?
ancestor
=
_inheritedWidgets
==
null
?
null
:
_inheritedWidgets
![
T
];
if
(
ancestor
!=
null
)
{
if
(
ancestor
!=
null
)
{
assert
(
ancestor
is
InheritedElement
);
return
dependOnInheritedElement
(
ancestor
,
aspect:
aspect
)
as
T
;
return
dependOnInheritedElement
(
ancestor
,
aspect:
aspect
)
as
T
;
}
}
_hadUnsatisfiedDependencies
=
true
;
_hadUnsatisfiedDependencies
=
true
;
...
...
packages/flutter/lib/src/widgets/gesture_detector.dart
View file @
3e7b2085
...
@@ -1328,7 +1328,6 @@ class _DefaultSemanticsGestureDelegate extends SemanticsGestureDelegate {
...
@@ -1328,7 +1328,6 @@ class _DefaultSemanticsGestureDelegate extends SemanticsGestureDelegate {
final
TapGestureRecognizer
?
tap
=
recognizers
[
TapGestureRecognizer
]
as
TapGestureRecognizer
?;
final
TapGestureRecognizer
?
tap
=
recognizers
[
TapGestureRecognizer
]
as
TapGestureRecognizer
?;
if
(
tap
==
null
)
if
(
tap
==
null
)
return
null
;
return
null
;
assert
(
tap
is
TapGestureRecognizer
);
return
()
{
return
()
{
assert
(
tap
!=
null
);
assert
(
tap
!=
null
);
...
@@ -1347,7 +1346,6 @@ class _DefaultSemanticsGestureDelegate extends SemanticsGestureDelegate {
...
@@ -1347,7 +1346,6 @@ class _DefaultSemanticsGestureDelegate extends SemanticsGestureDelegate {
return
null
;
return
null
;
return
()
{
return
()
{
assert
(
longPress
is
LongPressGestureRecognizer
);
if
(
longPress
.
onLongPressStart
!=
null
)
if
(
longPress
.
onLongPressStart
!=
null
)
longPress
.
onLongPressStart
!(
const
LongPressStartDetails
());
longPress
.
onLongPressStart
!(
const
LongPressStartDetails
());
if
(
longPress
.
onLongPress
!=
null
)
if
(
longPress
.
onLongPress
!=
null
)
...
@@ -1366,7 +1364,6 @@ class _DefaultSemanticsGestureDelegate extends SemanticsGestureDelegate {
...
@@ -1366,7 +1364,6 @@ class _DefaultSemanticsGestureDelegate extends SemanticsGestureDelegate {
final
GestureDragUpdateCallback
?
horizontalHandler
=
horizontal
==
null
?
final
GestureDragUpdateCallback
?
horizontalHandler
=
horizontal
==
null
?
null
:
null
:
(
DragUpdateDetails
details
)
{
(
DragUpdateDetails
details
)
{
assert
(
horizontal
is
HorizontalDragGestureRecognizer
);
if
(
horizontal
.
onDown
!=
null
)
if
(
horizontal
.
onDown
!=
null
)
horizontal
.
onDown
!(
DragDownDetails
());
horizontal
.
onDown
!(
DragDownDetails
());
if
(
horizontal
.
onStart
!=
null
)
if
(
horizontal
.
onStart
!=
null
)
...
@@ -1380,7 +1377,6 @@ class _DefaultSemanticsGestureDelegate extends SemanticsGestureDelegate {
...
@@ -1380,7 +1377,6 @@ class _DefaultSemanticsGestureDelegate extends SemanticsGestureDelegate {
final
GestureDragUpdateCallback
?
panHandler
=
pan
==
null
?
final
GestureDragUpdateCallback
?
panHandler
=
pan
==
null
?
null
:
null
:
(
DragUpdateDetails
details
)
{
(
DragUpdateDetails
details
)
{
assert
(
pan
is
PanGestureRecognizer
);
if
(
pan
.
onDown
!=
null
)
if
(
pan
.
onDown
!=
null
)
pan
.
onDown
!(
DragDownDetails
());
pan
.
onDown
!(
DragDownDetails
());
if
(
pan
.
onStart
!=
null
)
if
(
pan
.
onStart
!=
null
)
...
@@ -1408,7 +1404,6 @@ class _DefaultSemanticsGestureDelegate extends SemanticsGestureDelegate {
...
@@ -1408,7 +1404,6 @@ class _DefaultSemanticsGestureDelegate extends SemanticsGestureDelegate {
final
GestureDragUpdateCallback
?
verticalHandler
=
vertical
==
null
?
final
GestureDragUpdateCallback
?
verticalHandler
=
vertical
==
null
?
null
:
null
:
(
DragUpdateDetails
details
)
{
(
DragUpdateDetails
details
)
{
assert
(
vertical
is
VerticalDragGestureRecognizer
);
if
(
vertical
.
onDown
!=
null
)
if
(
vertical
.
onDown
!=
null
)
vertical
.
onDown
!(
DragDownDetails
());
vertical
.
onDown
!(
DragDownDetails
());
if
(
vertical
.
onStart
!=
null
)
if
(
vertical
.
onStart
!=
null
)
...
@@ -1422,7 +1417,6 @@ class _DefaultSemanticsGestureDelegate extends SemanticsGestureDelegate {
...
@@ -1422,7 +1417,6 @@ class _DefaultSemanticsGestureDelegate extends SemanticsGestureDelegate {
final
GestureDragUpdateCallback
?
panHandler
=
pan
==
null
?
final
GestureDragUpdateCallback
?
panHandler
=
pan
==
null
?
null
:
null
:
(
DragUpdateDetails
details
)
{
(
DragUpdateDetails
details
)
{
assert
(
pan
is
PanGestureRecognizer
);
if
(
pan
.
onDown
!=
null
)
if
(
pan
.
onDown
!=
null
)
pan
.
onDown
!(
DragDownDetails
());
pan
.
onDown
!(
DragDownDetails
());
if
(
pan
.
onStart
!=
null
)
if
(
pan
.
onStart
!=
null
)
...
...
packages/flutter/test/services/message_codecs_test.dart
View file @
3e7b2085
...
@@ -55,7 +55,6 @@ void main() {
...
@@ -55,7 +55,6 @@ void main() {
expect
(
expect
(
()
=>
method
.
decodeEnvelope
(
errorData
),
()
=>
method
.
decodeEnvelope
(
errorData
),
throwsA
(
predicate
((
PlatformException
e
)
=>
throwsA
(
predicate
((
PlatformException
e
)
=>
e
is
PlatformException
&&
e
.
code
==
'errorCode'
&&
e
.
code
==
'errorCode'
&&
e
.
message
==
'errorMessage'
&&
e
.
message
==
'errorMessage'
&&
e
.
details
==
'errorDetails'
)));
e
.
details
==
'errorDetails'
)));
...
@@ -71,7 +70,7 @@ void main() {
...
@@ -71,7 +70,7 @@ void main() {
expect
(
expect
(
()
=>
method
.
decodeEnvelope
(
errorData
),
()
=>
method
.
decodeEnvelope
(
errorData
),
throwsA
(
predicate
((
PlatformException
e
)
=>
throwsA
(
predicate
((
PlatformException
e
)
=>
e
is
PlatformException
&&
e
.
stacktrace
==
'errorStacktrace'
)));
e
.
stacktrace
==
'errorStacktrace'
)));
});
});
test
(
'should allow null error message,'
,
()
{
test
(
'should allow null error message,'
,
()
{
...
@@ -84,8 +83,7 @@ void main() {
...
@@ -84,8 +83,7 @@ void main() {
()
=>
method
.
decodeEnvelope
(
errorData
),
()
=>
method
.
decodeEnvelope
(
errorData
),
throwsA
(
throwsA
(
predicate
((
PlatformException
e
)
{
predicate
((
PlatformException
e
)
{
return
e
is
PlatformException
&&
return
e
.
code
==
'errorCode'
&&
e
.
code
==
'errorCode'
&&
e
.
message
==
null
&&
e
.
message
==
null
&&
e
.
details
==
'errorDetails'
;
e
.
details
==
'errorDetails'
;
}),
}),
...
@@ -106,7 +104,6 @@ void main() {
...
@@ -106,7 +104,6 @@ void main() {
expect
(
expect
(
()
=>
jsonMethodCodec
.
decodeEnvelope
(
errorData
),
()
=>
jsonMethodCodec
.
decodeEnvelope
(
errorData
),
throwsA
(
predicate
((
PlatformException
e
)
=>
throwsA
(
predicate
((
PlatformException
e
)
=>
e
is
PlatformException
&&
e
.
code
==
'errorCode'
&&
e
.
code
==
'errorCode'
&&
e
.
message
==
'errorMessage'
&&
e
.
message
==
'errorMessage'
&&
e
.
details
==
'errorDetails'
)));
e
.
details
==
'errorDetails'
)));
...
@@ -122,7 +119,7 @@ void main() {
...
@@ -122,7 +119,7 @@ void main() {
expect
(
expect
(
()
=>
jsonMethodCodec
.
decodeEnvelope
(
errorData
!),
()
=>
jsonMethodCodec
.
decodeEnvelope
(
errorData
!),
throwsA
(
predicate
((
PlatformException
e
)
=>
throwsA
(
predicate
((
PlatformException
e
)
=>
e
is
PlatformException
&&
e
.
stacktrace
==
'errorStacktrace'
)));
e
.
stacktrace
==
'errorStacktrace'
)));
});
});
});
});
group
(
'JSON message codec'
,
()
{
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