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
ad170378
Commit
ad170378
authored
Jan 05, 2016
by
Adam Barth
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1073 from abarth/rm_scrolldirection_both
Remove ScrollDirection.both
parents
b4591274
7aa575b0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
19 deletions
+0
-19
viewport.dart
packages/flutter/lib/src/rendering/viewport.dart
+0
-8
mixed_viewport.dart
packages/flutter/lib/src/widgets/mixed_viewport.dart
+0
-8
scrollable.dart
packages/flutter/lib/src/widgets/scrollable.dart
+0
-3
No files found.
packages/flutter/lib/src/rendering/viewport.dart
View file @
ad170378
...
...
@@ -16,9 +16,6 @@ enum ScrollDirection {
/// Scroll up and down
vertical
,
/// Scroll in all four cardinal directions
both
}
/// A render object that's bigger on the inside.
...
...
@@ -44,8 +41,6 @@ class RenderViewport extends RenderBox with RenderObjectWithChildMixin<RenderBox
bool
_offsetIsSane
(
Offset
offset
,
ScrollDirection
direction
)
{
switch
(
direction
)
{
case
ScrollDirection
.
both
:
return
true
;
case
ScrollDirection
.
horizontal
:
return
offset
.
dy
==
0.0
;
case
ScrollDirection
.
vertical
:
...
...
@@ -84,9 +79,6 @@ class RenderViewport extends RenderBox with RenderObjectWithChildMixin<RenderBox
BoxConstraints
_getInnerConstraints
(
BoxConstraints
constraints
)
{
BoxConstraints
innerConstraints
;
switch
(
scrollDirection
)
{
case
ScrollDirection
.
both
:
innerConstraints
=
new
BoxConstraints
();
break
;
case
ScrollDirection
.
horizontal
:
innerConstraints
=
constraints
.
heightConstraints
();
break
;
...
...
packages/flutter/lib/src/widgets/mixed_viewport.dart
View file @
ad170378
...
...
@@ -319,9 +319,6 @@ class _MixedViewportElement extends RenderObjectElement<MixedViewport> {
return
childRenderObject
.
getMaxIntrinsicHeight
(
innerConstraints
);
case
ScrollDirection
.
horizontal
:
return
childRenderObject
.
getMaxIntrinsicWidth
(
innerConstraints
);
case
ScrollDirection
.
both
:
assert
(
false
);
// we don't support ScrollDirection.both, see issue 888
return
double
.
NAN
;
}
}
...
...
@@ -331,9 +328,6 @@ class _MixedViewportElement extends RenderObjectElement<MixedViewport> {
return
new
BoxConstraints
.
tightFor
(
width:
constraints
.
constrainWidth
());
case
ScrollDirection
.
horizontal
:
return
new
BoxConstraints
.
tightFor
(
height:
constraints
.
constrainHeight
());
case
ScrollDirection
.
both
:
assert
(
false
);
// we don't support ScrollDirection.both, see issue 888
return
null
;
}
}
...
...
@@ -373,7 +367,6 @@ class _MixedViewportElement extends RenderObjectElement<MixedViewport> {
'width (e.g. inside something else that scrolls horizontally), because it would then just eagerly build '
+
'all the children. You probably want to put the MixedViewport inside a Container with a fixed width.'
is
String
);
break
;
case
ScrollDirection
.
both
:
assert
(
false
);
// we don't support ScrollDirection.both, see issue 888
}
final
double
endOffset
=
widget
.
startOffset
+
extent
;
...
...
@@ -523,7 +516,6 @@ class _MixedViewportElement extends RenderObjectElement<MixedViewport> {
case
ScrollDirection
.
horizontal
:
renderObject
.
direction
=
BlockDirection
.
horizontal
;
break
;
case
ScrollDirection
.
both
:
assert
(
false
);
// we don't support ScrollDirection.both, see issue 888
}
renderObject
.
startOffset
=
_childOffsets
[
index
]
-
widget
.
startOffset
;
// Build all the widgets we still need.
...
...
packages/flutter/lib/src/widgets/scrollable.dart
View file @
ad170378
...
...
@@ -91,9 +91,6 @@ abstract class Scrollable extends StatefulComponent {
Point
scrollableCenter
=
scrollableBox
.
localToGlobal
(
new
Point
(
scrollableSize
.
width
/
2.0
,
0.0
));
scrollOffsetDelta
=
targetCenter
.
x
-
scrollableCenter
.
x
;
break
;
case
ScrollDirection
.
both
:
assert
(
false
);
// See https://github.com/flutter/engine/issues/888
break
;
}
ExtentScrollBehavior
scrollBehavior
=
scrollable
.
scrollBehavior
;
...
...
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