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
d1f02ae0
Unverified
Commit
d1f02ae0
authored
Apr 27, 2021
by
Ian Hickson
Committed by
GitHub
Apr 27, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Short-circuit _debugCanPerformMutations if debugDoingLayout is false (#81246)
parent
6beafa7b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
object.dart
packages/flutter/lib/src/rendering/object.dart
+9
-2
No files found.
packages/flutter/lib/src/rendering/object.dart
View file @
d1f02ae0
...
...
@@ -1359,11 +1359,18 @@ abstract class RenderObject extends AbstractNode with DiagnosticableTreeMixin im
/// Whether tree mutations are currently permitted.
///
/// Only valid when asserts are enabled. In release builds, always returns
/// null.
/// This is only useful during layout. One should also not mutate the tree at
/// other times (e.g. during paint or while assembling the semantic tree) but
/// this function does not currently enforce those conventions.
///
/// Only valid when asserts are enabled. This will throw in release builds.
bool
get
_debugCanPerformMutations
{
late
bool
result
;
assert
(()
{
if
(
owner
!=
null
&&
!
owner
!.
debugDoingLayout
)
{
result
=
true
;
return
true
;
}
RenderObject
node
=
this
;
while
(
true
)
{
if
(
node
.
_doingThisLayoutWithCallback
)
{
...
...
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