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
d7bc93b7
Commit
d7bc93b7
authored
Feb 27, 2016
by
Hixie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SizeObserver crusade: The Last Test
parent
b18047bf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
9 deletions
+3
-9
fractionally_sized_box_test.dart
...ages/flutter/test/widget/fractionally_sized_box_test.dart
+3
-9
No files found.
packages/flutter/test/widget/fractionally_sized_box_test.dart
View file @
d7bc93b7
...
...
@@ -10,7 +10,6 @@ import 'package:test/test.dart';
void
main
(
)
{
test
(
'FractionallySizedBox'
,
()
{
testWidgets
((
WidgetTester
tester
)
{
Size
detectedSize
;
GlobalKey
inner
=
new
GlobalKey
();
tester
.
pumpWidget
(
new
OverflowBox
(
minWidth:
0.0
,
...
...
@@ -22,19 +21,14 @@ void main() {
child:
new
FractionallySizedBox
(
width:
0.5
,
height:
0.25
,
child:
new
SizeObserver
(
onSizeChanged:
(
Size
size
)
{
detectedSize
=
size
;
},
child:
new
Container
(
key:
inner
)
child:
new
Container
(
key:
inner
)
)
)
));
expect
(
detectedSize
,
equals
(
const
Size
(
50.0
,
25.0
)));
RenderBox
box
=
inner
.
currentContext
.
findRenderObject
();
expect
(
box
.
size
,
equals
(
const
Size
(
50.0
,
25.0
)));
expect
(
box
.
localToGlobal
(
Point
.
origin
),
equals
(
const
Point
(
25.0
,
37.5
)));
});
});
...
...
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