Fix PageableList demo
PageableList's scrollBehavior depends on its itemsWrap property.
Also: deleted some commented out code that I'd forgotten to delete.
Revised PageableList et al
An itemExtent-computing SizeObserver is no longer needed to use PageableList. The PageableList just uses its own size as the itemExtent.
Added the itemsSnapAlignment property to PageableList which enables snapping scrolls to an adjacent item (the default), or any item boundary no not at all.
PageableList scrollOffsets now vary from 0.0 to itemCount instead of 0.0 to itemExtent * itemCount. Using logical coordinates instead of pixel coordinates means that the scroll position is insensitive to changes in the PageablList's size.
Added HomogenousPageViewport which is used by PageableList. HomogenousPageViewport scrollOffsets are defined as for PageableList.
Factored the (substantial) common parts of HomogenousViewport HomogenousPageViewport into a file private _ViewportBase class.
Removed PageableWidgetList. PageableList now just extends Scrollable. Moved PageableList into its own file.
Removed the pixel dependencies from ScrollBehavior. ScrollBehavior.createFlingSimulation() no longer sets the simulation's tolerance. The caller must do this instead.
Scrollable now uses pixelToScrollOffset() to convert from input gesture positions and velocities to scrollOffsets.
Fixes#710
- Remove unused FocusChanged typedef.
- Remove unused centerOfAttentionHeroTag.
- Modernize static functions for interacting with Scrollable by moving them
into the Scrollable class.
We had the units wrong on the tolerances. Previously we multiplied by the
device pixel ratio, which meant we got larger tolerances as we got more
resolution. Also, simplify logic in Newton for applying the tolerances.
Fixes#828
Add BoxConstraints.isNormalized feature.
Use this feature in asserts in all the intrinsic dimension methods, in
various relevant BoxConstraints methods, and in layout().
Wrap the _DebugSize logic in BoxConstraints.constrain() in an assert
block to avoid a branch in release mode.
Remove the logic in BoxConstraints.isSatisfiedBy() that dealt with
non-normalized values.
Add BoxConstraints.normalize().
Make RenderCustomOneChildLayoutBox.performLayout() only set
parentUsesSize on the child if the constraints aren't tight.
I had to add a setLocale method to WidgetTester and
split the code in FlutterBinding which handled locale
changes to allow me to dispatch a locale change w/o actually
changing what the c++ code reports as the locale.
Also added the test to Travis.
@abarth @jason-simmons