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
4913c4fc
Commit
4913c4fc
authored
Oct 05, 2015
by
Ian Hickson
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1489 from Hixie/cleanup
Add more debugging information to Widgets.
parents
90a0f630
f5834c9a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
5 deletions
+24
-5
basic.dart
packages/flutter/lib/src/widgets/basic.dart
+12
-0
framework.dart
packages/flutter/lib/src/widgets/framework.dart
+11
-4
scrollable.dart
packages/flutter/lib/src/widgets/scrollable.dart
+1
-1
No files found.
packages/flutter/lib/src/widgets/basic.dart
View file @
4913c4fc
...
@@ -712,6 +712,11 @@ class DefaultTextStyle extends InheritedWidget {
...
@@ -712,6 +712,11 @@ class DefaultTextStyle extends InheritedWidget {
}
}
bool
updateShouldNotify
(
DefaultTextStyle
old
)
=>
style
!=
old
.
style
;
bool
updateShouldNotify
(
DefaultTextStyle
old
)
=>
style
!=
old
.
style
;
void
debugFillDescription
(
List
<
String
>
description
)
{
super
.
debugFillDescription
(
description
);
'
$style
'
.
split
(
'
\n
'
).
forEach
(
description
.
add
);
}
}
}
class
Text
extends
StatelessComponent
{
class
Text
extends
StatelessComponent
{
...
@@ -738,6 +743,13 @@ class Text extends StatelessComponent {
...
@@ -738,6 +743,13 @@ class Text extends StatelessComponent {
text
=
new
StyledTextSpan
(
combinedStyle
,
[
text
]);
text
=
new
StyledTextSpan
(
combinedStyle
,
[
text
]);
return
new
Paragraph
(
text:
text
);
return
new
Paragraph
(
text:
text
);
}
}
void
debugFillDescription
(
List
<
String
>
description
)
{
super
.
debugFillDescription
(
description
);
description
.
add
(
'"
$data
"'
);
if
(
style
!=
null
)
'
$style
'
.
split
(
'
\n
'
).
forEach
(
description
.
add
);
}
}
}
class
Image
extends
LeafRenderObjectWidget
{
class
Image
extends
LeafRenderObjectWidget
{
...
...
packages/flutter/lib/src/widgets/framework.dart
View file @
4913c4fc
...
@@ -182,10 +182,15 @@ abstract class Widget {
...
@@ -182,10 +182,15 @@ abstract class Widget {
Element
createElement
();
Element
createElement
();
String
toString
()
{
String
toString
()
{
if
(
key
==
null
)
final
String
name
=
key
==
null
?
'
$runtimeType
'
:
'
$runtimeType
-
$key
'
;
return
'
$runtimeType
'
;
final
List
<
String
>
data
=
<
String
>[];
return
'
$runtimeType
-
$key
'
;
debugFillDescription
(
data
);
}
if
(
data
.
isEmpty
)
return
'name'
;
return
'name(
${data.join("; ")}
)'
;
}
void
debugFillDescription
(
List
<
String
>
description
)
{
}
}
}
/// RenderObjectWidgets provide the configuration for [RenderObjectElement]s,
/// RenderObjectWidgets provide the configuration for [RenderObjectElement]s,
...
@@ -795,6 +800,8 @@ abstract class Element<T extends Widget> implements BuildContext {
...
@@ -795,6 +800,8 @@ abstract class Element<T extends Widget> implements BuildContext {
description
.
add
(
'no depth'
);
description
.
add
(
'no depth'
);
if
(
widget
==
null
)
if
(
widget
==
null
)
description
.
add
(
'no widget'
);
description
.
add
(
'no widget'
);
else
widget
.
debugFillDescription
(
description
);
}
}
String
toStringDeep
([
String
prefixLineOne
=
''
,
String
prefixOtherLines
=
''
])
{
String
toStringDeep
([
String
prefixLineOne
=
''
,
String
prefixOtherLines
=
''
])
{
...
...
packages/flutter/lib/src/widgets/scrollable.dart
View file @
4913c4fc
...
@@ -318,7 +318,7 @@ class ScrollableViewportState extends ScrollableState<ScrollableViewport> {
...
@@ -318,7 +318,7 @@ class ScrollableViewportState extends ScrollableState<ScrollableViewport> {
});
});
}
}
void
_updateScrollBehaviour
()
{
void
_updateScrollBehaviour
()
{
// if you don't call this from build()
or syncConstructorArguments()
, you must call it from setState().
// if you don't call this from build(), you must call it from setState().
scrollTo
(
scrollBehavior
.
updateExtents
(
scrollTo
(
scrollBehavior
.
updateExtents
(
contentExtent:
_childSize
,
contentExtent:
_childSize
,
containerExtent:
_viewportSize
,
containerExtent:
_viewportSize
,
...
...
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