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
ece851d5
Commit
ece851d5
authored
Nov 14, 2016
by
Ian Hickson
Committed by
GitHub
Nov 14, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor improvements to the render tree dump. (#6831)
Also fixes
https://github.com/flutter/flutter/issues/6510
parent
f0b8c866
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
49 additions
and
9 deletions
+49
-9
box_painter.dart
packages/flutter/lib/src/painting/box_painter.dart
+10
-3
decoration.dart
packages/flutter/lib/src/painting/decoration.dart
+9
-1
flutter_logo.dart
packages/flutter/lib/src/painting/flutter_logo.dart
+1
-1
object.dart
packages/flutter/lib/src/rendering/object.dart
+4
-1
proxy_box.dart
packages/flutter/lib/src/rendering/proxy_box.dart
+1
-1
framework.dart
packages/flutter/lib/src/widgets/framework.dart
+24
-2
No files found.
packages/flutter/lib/src/painting/box_painter.dart
View file @
ece851d5
...
...
@@ -1191,7 +1191,7 @@ class BoxDecoration extends Decoration {
/// If the method is passed a non-empty string argument, then the output will
/// span multiple lines, each prefixed by that argument.
@override
String
toString
([
String
prefix
=
''
])
{
String
toString
([
String
prefix
=
''
,
String
indentPrefix
])
{
List
<
String
>
result
=
<
String
>[];
if
(
backgroundColor
!=
null
)
result
.
add
(
'
${prefix}
backgroundColor:
$backgroundColor
'
);
...
...
@@ -1201,8 +1201,15 @@ class BoxDecoration extends Decoration {
result
.
add
(
'
${prefix}
border:
$border
'
);
if
(
borderRadius
!=
null
)
result
.
add
(
'
${prefix}
borderRadius:
$borderRadius
'
);
if
(
boxShadow
!=
null
)
result
.
add
(
'
${prefix}
boxShadow:
${boxShadow.map((BoxShadow shadow) => shadow.toString())}
'
);
if
(
boxShadow
!=
null
)
{
if
(
indentPrefix
!=
null
&&
boxShadow
.
length
>
1
)
{
result
.
add
(
'
${prefix}
boxShadow:'
);
for
(
BoxShadow
shadow
in
boxShadow
)
result
.
add
(
'
$indentPrefix$shadow
'
);
}
else
{
result
.
add
(
'
${prefix}
boxShadow:
${boxShadow.map((BoxShadow shadow) => shadow.toString()).join(", ")}
'
);
}
}
if
(
gradient
!=
null
)
result
.
add
(
'
${prefix}
gradient:
$gradient
'
);
if
(
shape
!=
BoxShape
.
rectangle
)
...
...
packages/flutter/lib/src/painting/decoration.dart
View file @
ece851d5
...
...
@@ -79,8 +79,16 @@ abstract class Decoration {
/// if it is a [BoxDecoration] with definitely no [BackgroundImage]).
BoxPainter
createBoxPainter
([
VoidCallback
onChanged
]);
/// Returns a string representation of this object.
///
/// Every line of the output should be prefixed by `prefix`.
///
/// If `indentPrefix` is non-null, then the description can be further split
/// into sublines, and each subline should be prefixed with `indentPrefix`
/// (rather that `prefix`). This is used, for example, by [BoxDecoration] for
/// the otherwise quite verbose [BoxShadow] descriptions.
@override
String
toString
([
String
prefix
=
''
])
=>
'
$prefix$runtimeType
'
;
String
toString
([
String
prefix
=
''
,
String
indentPrefix
])
=>
'
$prefix$runtimeType
'
;
}
/// A stateful class that can paint a particular [Decoration].
...
...
packages/flutter/lib/src/painting/flutter_logo.dart
View file @
ece851d5
...
...
@@ -220,7 +220,7 @@ class FlutterLogoDecoration extends Decoration {
}
@override
String
toString
([
String
prefix
=
''
])
{
String
toString
([
String
prefix
=
''
,
String
prefixIndent
])
{
final
String
extra
=
_inTransition
?
', transition
$_position
:
$_opacity
'
:
''
;
if
(
swatch
==
null
)
return
'
$prefix$runtimeType
(null,
$style$extra
)'
;
...
...
packages/flutter/lib/src/rendering/object.dart
View file @
ece851d5
...
...
@@ -2409,7 +2409,10 @@ abstract class RenderObject extends AbstractNode implements HitTestTarget {
final
String
descriptionPrefix
=
childrenDescription
!=
''
?
'
$prefixOtherLines
\
u2502 '
:
'
$prefixOtherLines
'
;
List
<
String
>
description
=
<
String
>[];
debugFillDescription
(
description
);
result
+=
description
.
map
((
String
description
)
=>
"
$descriptionPrefix$description
\n
"
).
join
();
result
+=
description
.
expand
((
String
description
)
=>
description
.
split
(
'
\n
'
))
.
map
/*<String>*/
((
String
line
)
=>
"
$descriptionPrefix$line
\n
"
)
.
join
();
if
(
childrenDescription
==
''
)
result
+=
'
$prefixOtherLines
\n
'
;
result
+=
childrenDescription
;
...
...
packages/flutter/lib/src/rendering/proxy_box.dart
View file @
ece851d5
...
...
@@ -1298,7 +1298,7 @@ class RenderDecoratedBox extends RenderProxyBox {
void
debugFillDescription
(
List
<
String
>
description
)
{
super
.
debugFillDescription
(
description
);
description
.
add
(
'decoration:'
);
description
.
addAll
(
_decoration
.
toString
(
" "
).
split
(
'
\n
'
));
description
.
addAll
(
_decoration
.
toString
(
' '
,
' '
).
split
(
'
\n
'
));
description
.
add
(
'configuration:
$configuration
'
);
}
}
...
...
packages/flutter/lib/src/widgets/framework.dart
View file @
ece851d5
...
...
@@ -2560,7 +2560,19 @@ abstract class Element implements BuildContext {
}
if
(
node
!=
null
)
chain
.
add
(
'
\
u22EF'
);
return
chain
.
join
(
'
\
u2190 '
);
String
result
=
''
;
String
line
=
''
;
for
(
String
link
in
chain
)
{
if
(
line
!=
''
)
line
+=
'
\
u2190 '
;
if
(
link
.
length
>
3
&&
line
.
length
+
link
.
length
>
65
)
{
result
+=
'
$line
\n
'
;
line
=
' '
;
}
line
+=
link
;
}
result
+=
line
;
return
result
;
}
/// A short, textual description of this element.
...
...
@@ -3462,7 +3474,10 @@ abstract class RenderObjectElement extends BuildableElement {
}
void
_debugUpdateRenderObjectOwner
()
{
_renderObject
.
debugCreator
=
debugGetCreatorChain
(
10
);
assert
(()
{
_renderObject
.
debugCreator
=
new
_DebugCreator
(
this
);
return
true
;
});
}
@override
...
...
@@ -3922,6 +3937,13 @@ class MultiChildRenderObjectElement extends RenderObjectElement {
}
}
class
_DebugCreator
{
_DebugCreator
(
this
.
element
);
final
RenderObjectElement
element
;
@override
String
toString
()
=>
element
.
debugGetCreatorChain
(
12
);
}
void
_debugReportException
(
String
context
,
dynamic
exception
,
StackTrace
stack
,
{
InformationCollector
informationCollector
})
{
...
...
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