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
c504797c
Unverified
Commit
c504797c
authored
Feb 18, 2022
by
Taha Tesser
Committed by
GitHub
Feb 18, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove `clipBehavior == Clip.none` conditions (#98503)
parent
0ed7fc88
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
24 deletions
+17
-24
form_section.dart
packages/flutter/lib/src/cupertino/form_section.dart
+5
-7
material.dart
packages/flutter/lib/src/material/material.dart
+0
-3
interactive_viewer.dart
packages/flutter/lib/src/widgets/interactive_viewer.dart
+4
-8
form_section_test.dart
packages/flutter/test/cupertino/form_section_test.dart
+3
-1
material_test.dart
packages/flutter/test/material/material_test.dart
+2
-1
interactive_viewer_test.dart
packages/flutter/test/widgets/interactive_viewer_test.dart
+3
-4
No files found.
packages/flutter/lib/src/cupertino/form_section.dart
View file @
c504797c
...
...
@@ -293,13 +293,11 @@ class CupertinoFormSection extends StatelessWidget {
),
Padding
(
padding:
margin
,
child:
clipBehavior
==
Clip
.
none
?
decoratedChildrenGroup
:
ClipRRect
(
borderRadius:
childrenGroupBorderRadius
,
clipBehavior:
clipBehavior
,
child:
decoratedChildrenGroup
,
),
child:
ClipRRect
(
borderRadius:
childrenGroupBorderRadius
,
clipBehavior:
clipBehavior
,
child:
decoratedChildrenGroup
,
),
),
if
(
footer
!=
null
)
Align
(
...
...
packages/flutter/lib/src/material/material.dart
View file @
c504797c
...
...
@@ -450,9 +450,6 @@ class _MaterialState extends State<Material> with TickerProviderStateMixin {
shape:
shape
,
child:
contents
,
);
if
(
clipBehavior
==
Clip
.
none
)
{
return
child
;
}
return
ClipPath
(
clipper:
ShapeBorderClipper
(
shape:
shape
,
...
...
packages/flutter/lib/src/widgets/interactive_viewer.dart
View file @
c504797c
...
...
@@ -1103,14 +1103,10 @@ class _InteractiveViewerBuilt extends StatelessWidget {
);
}
if
(
clipBehavior
!=
Clip
.
none
)
{
child
=
ClipRect
(
clipBehavior:
clipBehavior
,
child:
child
,
);
}
return
child
;
return
ClipRect
(
clipBehavior:
clipBehavior
,
child:
child
,
);
}
}
...
...
packages/flutter/test/cupertino/form_section_test.dart
View file @
c504797c
...
...
@@ -3,6 +3,7 @@
// found in the LICENSE file.
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/rendering.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
void
main
(
)
{
...
...
@@ -163,6 +164,7 @@ void main() {
),
);
expect
(
find
.
byType
(
ClipRRect
),
findsNothing
);
final
RenderClipRRect
renderClip
=
tester
.
allRenderObjects
.
whereType
<
RenderClipRRect
>().
first
;
expect
(
renderClip
.
clipBehavior
,
equals
(
Clip
.
none
));
});
}
packages/flutter/test/material/material_test.dart
View file @
c504797c
...
...
@@ -420,7 +420,8 @@ void main() {
),
);
expect
(
find
.
byKey
(
materialKey
),
hasNoImmediateClip
);
final
RenderClipPath
renderClip
=
tester
.
allRenderObjects
.
whereType
<
RenderClipPath
>().
first
;
expect
(
renderClip
.
clipBehavior
,
equals
(
Clip
.
none
));
});
testWidgets
(
'clips to bounding rect by default given Clip.antiAlias'
,
(
WidgetTester
tester
)
async
{
...
...
packages/flutter/test/widgets/interactive_viewer_test.dart
View file @
c504797c
...
...
@@ -6,6 +6,7 @@ import 'dart:math' as math;
import
'package:flutter/gestures.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/rendering.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
import
'package:vector_math/vector_math_64.dart'
show
Quad
,
Vector3
,
Matrix4
;
...
...
@@ -1168,10 +1169,8 @@ void main() {
),
);
expect
(
find
.
byType
(
ClipRect
),
findsNothing
,
);
final
RenderClipRect
renderClip
=
tester
.
allRenderObjects
.
whereType
<
RenderClipRect
>().
first
;
expect
(
renderClip
.
clipBehavior
,
equals
(
Clip
.
none
));
await
tester
.
pumpWidget
(
MaterialApp
(
...
...
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