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
c70df378
Unverified
Commit
c70df378
authored
Sep 27, 2021
by
nt4f04uNd
Committed by
GitHub
Sep 27, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change hitTest signatures to be non-nullable (#87792)
parent
0082ff97
Changes
14
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
34 additions
and
34 deletions
+34
-34
button.dart
packages/flutter/lib/src/material/button.dart
+1
-1
button_style_button.dart
packages/flutter/lib/src/material/button_style_button.dart
+1
-1
chip.dart
packages/flutter/lib/src/material/chip.dart
+2
-2
box.dart
packages/flutter/lib/src/rendering/box.dart
+2
-2
editable.dart
packages/flutter/lib/src/rendering/editable.dart
+3
-3
flow.dart
packages/flutter/lib/src/rendering/flow.dart
+2
-2
paragraph.dart
packages/flutter/lib/src/rendering/paragraph.dart
+3
-3
proxy_box.dart
packages/flutter/lib/src/rendering/proxy_box.dart
+8
-8
rotated_box.dart
packages/flutter/lib/src/rendering/rotated_box.dart
+2
-2
shifted_box.dart
packages/flutter/lib/src/rendering/shifted_box.dart
+2
-2
stack.dart
packages/flutter/lib/src/rendering/stack.dart
+2
-2
table.dart
packages/flutter/lib/src/rendering/table.dart
+2
-2
overlay.dart
packages/flutter/lib/src/widgets/overlay.dart
+2
-2
single_child_scroll_view.dart
...ges/flutter/lib/src/widgets/single_child_scroll_view.dart
+2
-2
No files found.
packages/flutter/lib/src/material/button.dart
View file @
c70df378
...
...
@@ -545,7 +545,7 @@ class _RenderInputPadding extends RenderShiftedBox {
return
result
.
addWithRawTransform
(
transform:
MatrixUtils
.
forceToPoint
(
center
),
position:
center
,
hitTest:
(
BoxHitTestResult
result
,
Offset
?
position
)
{
hitTest:
(
BoxHitTestResult
result
,
Offset
position
)
{
assert
(
position
==
center
);
return
child
!.
hitTest
(
result
,
position:
center
);
},
...
...
packages/flutter/lib/src/material/button_style_button.dart
View file @
c70df378
...
...
@@ -505,7 +505,7 @@ class _RenderInputPadding extends RenderShiftedBox {
return
result
.
addWithRawTransform
(
transform:
MatrixUtils
.
forceToPoint
(
center
),
position:
center
,
hitTest:
(
BoxHitTestResult
result
,
Offset
?
position
)
{
hitTest:
(
BoxHitTestResult
result
,
Offset
position
)
{
assert
(
position
==
center
);
return
child
!.
hitTest
(
result
,
position:
center
);
},
...
...
packages/flutter/lib/src/material/chip.dart
View file @
c70df378
...
...
@@ -1997,7 +1997,7 @@ class _RenderChipRedirectingHitDetection extends RenderConstrainedBox {
return
result
.
addWithRawTransform
(
transform:
MatrixUtils
.
forceToPoint
(
offset
),
position:
position
,
hitTest:
(
BoxHitTestResult
result
,
Offset
?
position
)
{
hitTest:
(
BoxHitTestResult
result
,
Offset
position
)
{
assert
(
position
==
offset
);
return
child
!.
hitTest
(
result
,
position:
offset
);
},
...
...
@@ -2535,7 +2535,7 @@ class _RenderChip extends RenderBox {
return
result
.
addWithRawTransform
(
transform:
MatrixUtils
.
forceToPoint
(
center
),
position:
position
,
hitTest:
(
BoxHitTestResult
result
,
Offset
?
position
)
{
hitTest:
(
BoxHitTestResult
result
,
Offset
position
)
{
assert
(
position
==
center
);
return
hitTestChild
.
hitTest
(
result
,
position:
center
);
},
...
...
packages/flutter/lib/src/rendering/box.dart
View file @
c70df378
...
...
@@ -2769,9 +2769,9 @@ mixin RenderBoxContainerDefaultsMixin<ChildType extends RenderBox, ParentDataTyp
final
bool
isHit
=
result
.
addWithPaintOffset
(
offset:
childParentData
.
offset
,
position:
position
,
hitTest:
(
BoxHitTestResult
result
,
Offset
?
transformed
)
{
hitTest:
(
BoxHitTestResult
result
,
Offset
transformed
)
{
assert
(
transformed
==
position
-
childParentData
.
offset
);
return
child
!.
hitTest
(
result
,
position:
transformed
!
);
return
child
!.
hitTest
(
result
,
position:
transformed
);
},
);
if
(
isHit
)
...
...
packages/flutter/lib/src/rendering/editable.dart
View file @
c70df378
...
...
@@ -1697,13 +1697,13 @@ class RenderEditable extends RenderBox with RelayoutWhenSystemFontsChangeMixin,
final
bool
isHit
=
result
.
addWithPaintTransform
(
transform:
transform
,
position:
position
,
hitTest:
(
BoxHitTestResult
result
,
Offset
?
transformed
)
{
hitTest:
(
BoxHitTestResult
result
,
Offset
transformed
)
{
assert
(()
{
final
Offset
manualPosition
=
(
position
-
textParentData
.
offset
)
/
textParentData
.
scale
!;
return
(
transformed
!
.
dx
-
manualPosition
.
dx
).
abs
()
<
precisionErrorTolerance
return
(
transformed
.
dx
-
manualPosition
.
dx
).
abs
()
<
precisionErrorTolerance
&&
(
transformed
.
dy
-
manualPosition
.
dy
).
abs
()
<
precisionErrorTolerance
;
}());
return
child
!.
hitTest
(
result
,
position:
transformed
!
);
return
child
!.
hitTest
(
result
,
position:
transformed
);
},
);
if
(
isHit
)
{
...
...
packages/flutter/lib/src/rendering/flow.dart
View file @
c70df378
...
...
@@ -426,8 +426,8 @@ class RenderFlow extends RenderBox
final
bool
absorbed
=
result
.
addWithPaintTransform
(
transform:
transform
,
position:
position
,
hitTest:
(
BoxHitTestResult
result
,
Offset
?
position
)
{
return
child
.
hitTest
(
result
,
position:
position
!
);
hitTest:
(
BoxHitTestResult
result
,
Offset
position
)
{
return
child
.
hitTest
(
result
,
position:
position
);
},
);
if
(
absorbed
)
...
...
packages/flutter/lib/src/rendering/paragraph.dart
View file @
c70df378
...
...
@@ -465,13 +465,13 @@ class RenderParagraph extends RenderBox
final
bool
isHit
=
result
.
addWithPaintTransform
(
transform:
transform
,
position:
position
,
hitTest:
(
BoxHitTestResult
result
,
Offset
?
transformed
)
{
hitTest:
(
BoxHitTestResult
result
,
Offset
transformed
)
{
assert
(()
{
final
Offset
manualPosition
=
(
position
-
textParentData
.
offset
)
/
textParentData
.
scale
!;
return
(
transformed
!
.
dx
-
manualPosition
.
dx
).
abs
()
<
precisionErrorTolerance
return
(
transformed
.
dx
-
manualPosition
.
dx
).
abs
()
<
precisionErrorTolerance
&&
(
transformed
.
dy
-
manualPosition
.
dy
).
abs
()
<
precisionErrorTolerance
;
}());
return
child
!.
hitTest
(
result
,
position:
transformed
!
);
return
child
!.
hitTest
(
result
,
position:
transformed
);
},
);
if
(
isHit
)
{
...
...
packages/flutter/lib/src/rendering/proxy_box.dart
View file @
c70df378
...
...
@@ -2370,8 +2370,8 @@ class RenderTransform extends RenderProxyBox {
return
result
.
addWithPaintTransform
(
transform:
transformHitTests
?
_effectiveTransform
:
null
,
position:
position
,
hitTest:
(
BoxHitTestResult
result
,
Offset
?
position
)
{
return
super
.
hitTestChildren
(
result
,
position:
position
!
);
hitTest:
(
BoxHitTestResult
result
,
Offset
position
)
{
return
super
.
hitTestChildren
(
result
,
position:
position
);
},
);
}
...
...
@@ -2665,8 +2665,8 @@ class RenderFittedBox extends RenderProxyBox {
return
result
.
addWithPaintTransform
(
transform:
_transform
,
position:
position
,
hitTest:
(
BoxHitTestResult
result
,
Offset
?
position
)
{
return
super
.
hitTestChildren
(
result
,
position:
position
!
);
hitTest:
(
BoxHitTestResult
result
,
Offset
position
)
{
return
super
.
hitTestChildren
(
result
,
position:
position
);
},
);
}
...
...
@@ -2751,8 +2751,8 @@ class RenderFractionalTranslation extends RenderProxyBox {
?
Offset
(
translation
.
dx
*
size
.
width
,
translation
.
dy
*
size
.
height
)
:
null
,
position:
position
,
hitTest:
(
BoxHitTestResult
result
,
Offset
?
position
)
{
return
super
.
hitTestChildren
(
result
,
position:
position
!
);
hitTest:
(
BoxHitTestResult
result
,
Offset
position
)
{
return
super
.
hitTestChildren
(
result
,
position:
position
);
},
);
}
...
...
@@ -5283,8 +5283,8 @@ class RenderFollowerLayer extends RenderProxyBox {
return
result
.
addWithPaintTransform
(
transform:
getCurrentTransform
(),
position:
position
,
hitTest:
(
BoxHitTestResult
result
,
Offset
?
position
)
{
return
super
.
hitTestChildren
(
result
,
position:
position
!
);
hitTest:
(
BoxHitTestResult
result
,
Offset
position
)
{
return
super
.
hitTestChildren
(
result
,
position:
position
);
},
);
}
...
...
packages/flutter/lib/src/rendering/rotated_box.dart
View file @
c70df378
...
...
@@ -104,8 +104,8 @@ class RenderRotatedBox extends RenderBox with RenderObjectWithChildMixin<RenderB
return
result
.
addWithPaintTransform
(
transform:
_paintTransform
,
position:
position
,
hitTest:
(
BoxHitTestResult
result
,
Offset
?
position
)
{
return
child
!.
hitTest
(
result
,
position:
position
!
);
hitTest:
(
BoxHitTestResult
result
,
Offset
position
)
{
return
child
!.
hitTest
(
result
,
position:
position
);
},
);
}
...
...
packages/flutter/lib/src/rendering/shifted_box.dart
View file @
c70df378
...
...
@@ -87,9 +87,9 @@ abstract class RenderShiftedBox extends RenderBox with RenderObjectWithChildMixi
return
result
.
addWithPaintOffset
(
offset:
childParentData
.
offset
,
position:
position
,
hitTest:
(
BoxHitTestResult
result
,
Offset
?
transformed
)
{
hitTest:
(
BoxHitTestResult
result
,
Offset
transformed
)
{
assert
(
transformed
==
position
-
childParentData
.
offset
);
return
child
!.
hitTest
(
result
,
position:
transformed
!
);
return
child
!.
hitTest
(
result
,
position:
transformed
);
},
);
}
...
...
packages/flutter/lib/src/rendering/stack.dart
View file @
c70df378
...
...
@@ -728,9 +728,9 @@ class RenderIndexedStack extends RenderStack {
return
result
.
addWithPaintOffset
(
offset:
childParentData
.
offset
,
position:
position
,
hitTest:
(
BoxHitTestResult
result
,
Offset
?
transformed
)
{
hitTest:
(
BoxHitTestResult
result
,
Offset
transformed
)
{
assert
(
transformed
==
position
-
childParentData
.
offset
);
return
child
.
hitTest
(
result
,
position:
transformed
!
);
return
child
.
hitTest
(
result
,
position:
transformed
);
},
);
}
...
...
packages/flutter/lib/src/rendering/table.dart
View file @
c70df378
...
...
@@ -1160,9 +1160,9 @@ class RenderTable extends RenderBox {
final
bool
isHit
=
result
.
addWithPaintOffset
(
offset:
childParentData
.
offset
,
position:
position
,
hitTest:
(
BoxHitTestResult
result
,
Offset
?
transformed
)
{
hitTest:
(
BoxHitTestResult
result
,
Offset
transformed
)
{
assert
(
transformed
==
position
-
childParentData
.
offset
);
return
child
.
hitTest
(
result
,
position:
transformed
!
);
return
child
.
hitTest
(
result
,
position:
transformed
);
},
);
if
(
isHit
)
...
...
packages/flutter/lib/src/widgets/overlay.dart
View file @
c70df378
...
...
@@ -768,9 +768,9 @@ class _RenderTheatre extends RenderBox with ContainerRenderObjectMixin<RenderBox
final
bool
isHit
=
result
.
addWithPaintOffset
(
offset:
childParentData
.
offset
,
position:
position
,
hitTest:
(
BoxHitTestResult
result
,
Offset
?
transformed
)
{
hitTest:
(
BoxHitTestResult
result
,
Offset
transformed
)
{
assert
(
transformed
==
position
-
childParentData
.
offset
);
return
child
!.
hitTest
(
result
,
position:
transformed
!
);
return
child
!.
hitTest
(
result
,
position:
transformed
);
},
);
if
(
isHit
)
...
...
packages/flutter/lib/src/widgets/single_child_scroll_view.dart
View file @
c70df378
...
...
@@ -585,9 +585,9 @@ class _RenderSingleChildViewport extends RenderBox with RenderObjectWithChildMix
return
result
.
addWithPaintOffset
(
offset:
_paintOffset
,
position:
position
,
hitTest:
(
BoxHitTestResult
result
,
Offset
?
transformed
)
{
hitTest:
(
BoxHitTestResult
result
,
Offset
transformed
)
{
assert
(
transformed
==
position
+
-
_paintOffset
);
return
child
!.
hitTest
(
result
,
position:
transformed
!
);
return
child
!.
hitTest
(
result
,
position:
transformed
);
},
);
}
...
...
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