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
1c3f6a85
Unverified
Commit
1c3f6a85
authored
Apr 13, 2018
by
Ian Hickson
Committed by
GitHub
Apr 13, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix formatting of Flex error message (#16498)
parent
0260642f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
1 deletion
+31
-1
flex.dart
packages/flutter/lib/src/rendering/flex.dart
+1
-1
flex_test.dart
packages/flutter/test/widgets/flex_test.dart
+30
-0
No files found.
packages/flutter/lib/src/rendering/flex.dart
View file @
1c3f6a85
...
...
@@ -681,7 +681,7 @@ class RenderFlex extends RenderBox with ContainerRenderObjectMixin<RenderBox, Fl
if
(
node
!=
null
)
{
information
.
writeln
(
'The nearest ancestor providing an unbounded width constraint is:'
);
information
.
write
(
' '
);
information
.
write
(
node
.
toStringShallow
(
joiner:
'
\n
'
));
information
.
write
ln
(
node
.
toStringShallow
(
joiner:
'
\n
'
));
}
information
.
writeln
(
'See also: https://flutter.io/layout/'
);
addendum
=
information
.
toString
();
...
...
packages/flutter/test/widgets/flex_test.dart
View file @
1c3f6a85
...
...
@@ -110,4 +110,34 @@ void main() {
),
);
});
testWidgets
(
'Error information is printed correctly'
,
(
WidgetTester
tester
)
async
{
// We run this twice, the first time without an error, so that the second time
// we only get a single exception. Otherwise we'd get two, the one we want and
// an extra one when we discover we never computed a size.
await
tester
.
pumpWidget
(
new
Column
(
children:
<
Widget
>[
new
Column
(),
],
),
Duration
.
zero
,
EnginePhase
.
layout
,
);
await
tester
.
pumpWidget
(
new
Column
(
children:
<
Widget
>[
new
Column
(
children:
<
Widget
>[
new
Expanded
(
child:
new
Container
()),
],
),
],
),
Duration
.
zero
,
EnginePhase
.
layout
,
);
final
String
message
=
tester
.
takeException
().
toString
();
expect
(
message
,
contains
(
'
\n
See also:'
));
});
}
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