114 Commits

Author SHA1 Message Date
Adam Barth
7f2dc47094 Add ScrollController (#7910)
If you pass a ScrollController to a Scrollable2, you can use the controller to
read and write the scroll offset without having to find the Scrollable2State
object.
2017-02-06 17:09:00 -08:00
Adam Barth
31e2a500f7 Use sliver-based scrolling in more places (#7892)
This patch uses sliver-based two more gallery demos, the stocks example,
in the date picker, and in markdown.
2017-02-05 21:39:24 -08:00
Adam Barth
ff14f35d6d CustomScrollView (#7881)
Also, use CustomScrollView in Shrine and fix a bug with one-line grids
not painting properly due to their reporiting zero paintExtent.
2017-02-03 22:52:25 -08:00
Ian Hickson
471e91d46f SliverBlock->SliverList (#7872) 2017-02-03 17:14:00 -08:00
Ian Hickson
332a23030b Rename and refactor ScrollView hierarchy (#7865)
This prepares us for a CustomScrollView that takes slivers.
2017-02-03 16:05:43 -08:00
Adam Barth
072cce88d6 Reparameterize Scrollable2 (#7853)
This patch makes a number of changes to how you can configure a
Scrollable2:

 - The ScrollPhysics is now responsible for creating the ScrollPosition.
   You can override the ScrollPhysics by supplying a `physics` argument
   to `Scrollable`, and the new physics you supply will be applied to
   the default physics inherited from the ScrollBehavior.

 - This patch removes the ScrollPosition/AbsoluteScrollPosition split as
   all clients were operating in pixels anyway and the split made the
   code very difficult to follow.

 - ScrollPosition no longer depends directly on Scrollable2State.
   Instead, it depends on an abstract interface that Scrollable2State
   implements. This change has two benefits:

    a) It removes the circular dependency between ScrollPosition and
       Scrollable2State, which lets us split the code for these classes
       (and several other classes that got wrapped up in that cycle) into
       separate libraries for easier maintenance.

    b) ScrollPosition is no longer bound to Scrollable2, which means you
       could use the behavior machinery to drive other sorts of widgets.
       For example, we could use it to drive Scrollabe1 if we wanted.
2017-02-03 14:28:17 -08:00
Adam Barth
2ec02c3395 Remove Scrollable2.initialScrollOffset (#7842)
This property is wired up to anything and it isn't used. We'll need to find a
better way for clients to control the scroll offset.
2017-02-03 11:18:47 -08:00
Adam Barth
3231465769 Add PageView (#7809)
This widget is a start towards replacing PageableList. There are still a number
of features that we'll need to add before this widget can replace PageableList.
2017-02-02 16:16:20 -08:00
Ian Hickson
5928d221d4 ShrinkWrap Viewport (#7790) 2017-02-02 14:50:04 -08:00
Adam Barth
fe01c71cf4 Switch clients to ScrollGrid (#7752)
The only remaining client of ScrollableGrid (the old version) is Pesto,
which needs AppBar integration.
2017-02-01 11:01:02 -08:00
Adam Barth
695302029f Revert "Revert "Add SliverGrid and ScrollGrid"" (#7780) 2017-02-01 10:18:48 -08:00
Ian Hickson
32784d35f9 Revert "Add SliverGrid and ScrollGrid" (#7769) 2017-01-31 17:34:02 -08:00
Adam Barth
9119969ad2 Add SliverGrid and ScrollGrid (#7745)
This patch adds grid supports to slivers and introduces a ScrollGrid
convenience class for making the common types of scrollable grids.

This patch also deploys ScrollGrid in an example in the Flutter Gallery.
2017-01-30 17:27:51 -08:00
Adam Barth
098af18393 Add SliverList (#7727)
Add SliverList

A SliverList is a linear layout of box children in a viewport that all
have a common, fixed extent along the scroll axis. The layout is similar
to a SliverBlock but more efficient.
2017-01-30 00:40:50 -08:00