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
e12d31ad
Unverified
Commit
e12d31ad
authored
Jul 18, 2023
by
Ian Hickson
Committed by
GitHub
Jul 18, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Document stack's clipping behaviour better (#130749)
Fixes
https://github.com/flutter/flutter/issues/40216
parent
e276629f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
1 deletion
+19
-1
stack.dart
packages/flutter/lib/src/rendering/stack.dart
+10
-1
basic.dart
packages/flutter/lib/src/widgets/basic.dart
+9
-0
No files found.
packages/flutter/lib/src/rendering/stack.dart
View file @
e12d31ad
...
...
@@ -435,7 +435,16 @@ class RenderStack extends RenderBox
/// {@macro flutter.material.Material.clipBehavior}
///
/// Defaults to [Clip.hardEdge], and must not be null.
/// Stacks only clip children whose geometry overflow the stack. A child that
/// paints outside its bounds (e.g. a box with a shadow) will not be clipped,
/// regardless of the value of this property. Similarly, a child that itself
/// has a descendant that overflows the stack will not be clipped, as only the
/// geometry of the stack's direct children are considered.
///
/// To clip children whose geometry does not overflow the stack, consider
/// using a [RenderClipRect] render object.
///
/// Defaults to [Clip.hardEdge].
Clip
get
clipBehavior
=>
_clipBehavior
;
Clip
_clipBehavior
=
Clip
.
hardEdge
;
set
clipBehavior
(
Clip
value
)
{
...
...
packages/flutter/lib/src/widgets/basic.dart
View file @
e12d31ad
...
...
@@ -3914,6 +3914,15 @@ class Stack extends MultiChildRenderObjectWidget {
/// {@macro flutter.material.Material.clipBehavior}
///
/// Stacks only clip children whose geometry overflow the stack. A child that
/// paints outside its bounds (e.g. a box with a shadow) will not be clipped,
/// regardless of the value of this property. Similarly, a child that itself
/// has a descendant that overflows the stack will not be clipped, as only the
/// geometry of the stack's direct children are considered.
///
/// To clip children whose geometry does not overflow the stack, consider
/// using a [ClipRect] widget.
///
/// Defaults to [Clip.hardEdge].
final
Clip
clipBehavior
;
...
...
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