Also, rename ScrollableMetrics to ScrollMetrics, which follows the
naming convention for most of the other classes (e.g., ScrollPosition,
ScrollPhysics).
Finally, fix a bug whereby SingleChildScrollView could not have a
GlobalKey, because, write test, find bug.
When a ListView scrolls, it generates a LayoutChangedNotification, which was
causing Material to repaint unconditionally. That's not necessary if there are
no ink effects that need to be moved. This patch skips the repaint in that
case.
Fixes#7937
Move the back button and drawer opening logic into the app bar.
Move the tap-status-bar-to-scroll-to-top logic to using
ScrollControllers. Provide a PrimaryScrollController and a `primary`
flag on scroll views.
Make it possible to track when a route becomes or stops being poppable.
This patch improves PageView to the point where we can use it in the date
picker. Specifically, you now get onPageChanged notifications and you can
control which page is visible using a PageController.
Also, move the creation of the ScrollPosition to ScrollController.
Finally, remove TestScrollable in favor of CustomScrollView, which is the
production version of this widget.
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.
* Small Flutter strong mode cleanup fixes.
These are cases where strong mode down cast composite errors
generally indicated cases that would performance or correctness
issues if Flutter code was run in a strong mode VM.
* Fix Command API so that it is always in terms of Map<String,String>.
* Fix typedef
This patch converts the Shrine home page to using a sliver-based grid.
This required using a CustomScrollView to mix the block at the top with
the grid below.
We now create a GridLayout object that memoizes the layout information
for a given SliverConstraints. This approach is both more efficient
(because the delegate no longer needs to re-solve its layout for each
child) and allows for more code sharing between delegates.
The SliverGridRegularTileLayout will also be useful for the date
picker.
Also, document the grid delegates.
This patch moves the resonsibility for wrapping repaint boundaries
around children to SliverChildDelegate, which means delegates can choose
whether or no to use repaint boundaries.
Also introduce SliverChildBuilderDelegate to make it easier to use the
builder pattern with sliver lists.
This functionality will be used by date picker, which wants to use a
SliverGrid but doesn't need a repaint boundary around every day in a
month grid.
* allow mulitple observers for Navigator and MaterialApp
* add test for the navigator observers
* fix style
* add test for adding/removing a navigator observer
This patch makes Scrollable2.ensureVisible with SingleChildScrollView. A future
patch will extend the implementation to work with slivers. (Although the patch
does include some of the infrastructure for that part of the implementation as
well.)