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
4c823cdb
Commit
4c823cdb
authored
Feb 02, 2016
by
yjbanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add debugFillDescription to OverflowBox
parent
3abb8c4e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
0 deletions
+28
-0
basic.dart
packages/flutter/lib/src/widgets/basic.dart
+12
-0
overflow_box_test.dart
packages/flutter/test/widget/overflow_box_test.dart
+16
-0
No files found.
packages/flutter/lib/src/widgets/basic.dart
View file @
4c823cdb
...
@@ -655,6 +655,18 @@ class OverflowBox extends OneChildRenderObjectWidget {
...
@@ -655,6 +655,18 @@ class OverflowBox extends OneChildRenderObjectWidget {
..
maxHeight
=
maxHeight
..
maxHeight
=
maxHeight
..
alignment
=
alignment
;
..
alignment
=
alignment
;
}
}
void
debugFillDescription
(
List
<
String
>
description
)
{
super
.
debugFillDescription
(
description
);
if
(
minWidth
!=
null
)
description
.
add
(
'minWidth:
$minWidth
'
);
if
(
maxWidth
!=
null
)
description
.
add
(
'maxWidth:
$maxWidth
'
);
if
(
minHeight
!=
null
)
description
.
add
(
'minHeight:
$minHeight
'
);
if
(
maxHeight
!=
null
)
description
.
add
(
'maxHeight:
$maxHeight
'
);
}
}
}
class
SizedOverflowBox
extends
OneChildRenderObjectWidget
{
class
SizedOverflowBox
extends
OneChildRenderObjectWidget
{
...
...
packages/flutter/test/widget/overflow_box_test.dart
View file @
4c823cdb
...
@@ -32,4 +32,20 @@ void main() {
...
@@ -32,4 +32,20 @@ void main() {
expect
(
box
.
size
,
equals
(
const
Size
(
100.0
,
50.0
)));
expect
(
box
.
size
,
equals
(
const
Size
(
100.0
,
50.0
)));
});
});
});
});
test
(
'OverflowBox implements debugFillDescription'
,
()
{
List
<
String
>
description
=
<
String
>[];
new
OverflowBox
(
minWidth:
1.0
,
maxWidth:
2.0
,
minHeight:
3.0
,
maxHeight:
4.0
).
debugFillDescription
(
description
);
expect
(
description
,
[
'minWidth: 1.0'
,
'maxWidth: 2.0'
,
'minHeight: 3.0'
,
'maxHeight: 4.0'
,
]);
});
}
}
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