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
79c3905e
Commit
79c3905e
authored
Mar 07, 2016
by
Hixie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup around viewports
parent
8a2865ce
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletion
+17
-1
viewport.dart
packages/flutter/lib/src/rendering/viewport.dart
+13
-0
scroll_behavior.dart
packages/flutter/lib/src/widgets/scroll_behavior.dart
+4
-1
No files found.
packages/flutter/lib/src/rendering/viewport.dart
View file @
79c3905e
...
...
@@ -195,6 +195,14 @@ class RenderViewportBase extends RenderBox implements HasScrollDirection {
super
.
applyPaintTransform
(
child
,
transform
.
translate
(
effectivePaintOffset
.
dx
,
effectivePaintOffset
.
dy
));
}
void
debugFillDescription
(
List
<
String
>
description
)
{
super
.
debugFillDescription
(
description
);
description
.
add
(
'paintOffset:
$paintOffset
'
);
description
.
add
(
'scrollDirection:
$scrollDirection
'
);
description
.
add
(
'scrollAnchor:
$scrollAnchor
'
);
if
(
overlayPainter
!=
null
)
description
.
add
(
'overlay painter:
$overlayPainter
'
);
}
}
typedef
Offset
ViewportDimensionsChangeCallback
(
ViewportDimensions
dimensions
);
...
...
@@ -373,4 +381,9 @@ abstract class RenderVirtualViewport<T extends ContainerBoxParentDataMixin<Rende
}
Rect
describeApproximatePaintClip
(
RenderObject
child
)
=>
Point
.
origin
&
size
;
void
debugFillDescription
(
List
<
String
>
description
)
{
super
.
debugFillDescription
(
description
);
description
.
add
(
'virtual child count:
$virtualChildCount
'
);
}
}
packages/flutter/lib/src/widgets/scroll_behavior.dart
View file @
79c3905e
...
...
@@ -71,6 +71,7 @@ abstract class ExtentScrollBehavior extends ScrollBehavior<double, double> {
double
containerExtent
,
double
scrollOffset:
0.0
})
{
assert
(
minScrollOffset
<=
maxScrollOffset
);
if
(
contentExtent
!=
null
)
_contentExtent
=
contentExtent
;
if
(
containerExtent
!=
null
)
...
...
@@ -109,8 +110,10 @@ class BoundedBehavior extends ExtentScrollBehavior {
double
minScrollOffset
,
double
scrollOffset:
0.0
})
{
if
(
minScrollOffset
!=
null
)
if
(
minScrollOffset
!=
null
)
{
_minScrollOffset
=
minScrollOffset
;
assert
(
minScrollOffset
<=
maxScrollOffset
);
}
return
super
.
updateExtents
(
contentExtent:
contentExtent
,
containerExtent:
containerExtent
,
...
...
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