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
773902c5
Unverified
Commit
773902c5
authored
Jan 23, 2018
by
Hans Muller
Committed by
GitHub
Jan 23, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix _RenderDecoration.debugDescribeChildren() (#14217)
parent
894d9d2c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
1 deletion
+42
-1
input_decorator.dart
packages/flutter/lib/src/material/input_decorator.dart
+1
-1
input_decorator_test.dart
packages/flutter/test/material/input_decorator_test.dart
+41
-0
No files found.
packages/flutter/lib/src/material/input_decorator.dart
View file @
773902c5
...
@@ -674,7 +674,7 @@ class _RenderDecoration extends RenderBox {
...
@@ -674,7 +674,7 @@ class _RenderDecoration extends RenderBox {
final
List
<
DiagnosticsNode
>
value
=
<
DiagnosticsNode
>[];
final
List
<
DiagnosticsNode
>
value
=
<
DiagnosticsNode
>[];
void
add
(
RenderBox
child
,
String
name
)
{
void
add
(
RenderBox
child
,
String
name
)
{
if
(
child
!=
null
)
if
(
child
!=
null
)
value
.
add
(
input
.
toDiagnosticsNode
(
name:
name
));
value
.
add
(
child
.
toDiagnosticsNode
(
name:
name
));
}
}
add
(
icon
,
'icon'
);
add
(
icon
,
'icon'
);
add
(
input
,
'input'
);
add
(
input
,
'input'
);
...
...
packages/flutter/test/material/input_decorator_test.dart
View file @
773902c5
...
@@ -1049,6 +1049,47 @@ void main() {
...
@@ -1049,6 +1049,47 @@ void main() {
);
);
});
});
testWidgets
(
'InputDecorator.debugDescribeChildren'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
buildInputDecorator
(
decoration:
const
InputDecoration
(
icon:
const
Text
(
'icon'
),
labelText:
'label'
,
hintText:
'hint'
,
prefixText:
'prefix'
,
suffixText:
'suffix'
,
prefixIcon:
const
Text
(
'prefixIcon'
),
suffixIcon:
const
Text
(
'suffixIcon'
),
helperText:
'helper'
,
counterText:
'counter'
,
),
child:
const
Text
(
'text'
),
),
);
final
RenderObject
renderer
=
tester
.
renderObject
(
find
.
byType
(
InputDecorator
));
final
Iterable
<
String
>
nodeNames
=
renderer
.
debugDescribeChildren
()
.
map
((
DiagnosticsNode
node
)
=>
node
.
name
);
expect
(
nodeNames
,
unorderedEquals
(<
String
>[
'container'
,
'counter'
,
'helperError'
,
'hint'
,
'icon'
,
'input'
,
'label'
,
'prefix'
,
'prefixIcon'
,
'suffix'
,
'suffixIcon'
,
]));
final
Set
<
Object
>
nodeValues
=
new
Set
<
Object
>.
from
(
renderer
.
debugDescribeChildren
().
map
<
Object
>((
DiagnosticsNode
node
)
=>
node
.
value
)
);
expect
(
nodeValues
.
length
,
11
);
});
testWidgets
(
'InputDecorator with empty border and label'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'InputDecorator with empty border and label'
,
(
WidgetTester
tester
)
async
{
// Regression test for https://github.com/flutter/flutter/issues/14165
// Regression test for https://github.com/flutter/flutter/issues/14165
await
tester
.
pumpWidget
(
await
tester
.
pumpWidget
(
...
...
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