Hans Muller efa6f019bc Merge pull request #1379 from HansMuller/scrolling_snap_offsets
SnapOffsets for fling scrolling

Initial snap offset support for ScrollableWidgetList (and ScrollableList<T>) and ScrollableMixedWidgetList. If a ```toSnapOffset(scrollOffset)``` function is provided, fling Scrolls will coast to the returned value. If ```alignmentOffset``` is specified then fling scrolls conclude when toSnapOffset's value lines up with the Scrollable widget's origin + alignmentOffset. For example if the Scrollable widget's height was 200.0, and alignmentOffset:100.0 was specified, then fling scrolls would end with the value returned by toSnapOffset() lined up with the center of the Scrollable.

This approach to Scrollable snapping assumes that the layout of whatever the Scrollable contains is known at the outset. This is often true however a ScrollableMixedWidgetList may not know its items' sizes until they've been reached by scrolling.

This is a first cut at snapping support. Among the things that remain to be done:
- Scrolling limits trump snapping. Snapping should probably trump scrolling limits.
- Drag scrolls aren't snapped. This may be desirable so perhaps the feature should be controlled with a flag.
- Specifying alignmentOffset as a percentage would probably be more convenient.
- It would be nice if one could wrap items in a SnapOffset value like: ```new SnapOffset(0.5, child: myItem)``` to snap to the center of the item.

Updated the CardCollection example: snapping and fixed size items can be turned on/off with Drawer checkboxes.
2015-09-29 11:15:23 -07:00
2015-09-29 11:09:59 -07:00
2015-09-08 13:32:50 -07:00
2015-09-29 11:09:59 -07:00
2015-09-16 09:03:47 -07:00
2015-07-16 10:16:42 -07:00
2015-07-16 10:16:42 -07:00
2015-09-10 08:49:56 -07:00
.gn
2015-07-16 10:16:42 -07:00
2015-07-24 12:24:05 -07:00
2015-09-25 14:28:39 -07:00
2015-07-16 10:16:42 -07:00
2015-09-20 14:02:52 -07:00

Flutter

Build Status

Flutter is a new way to build high-performance, cross-platform mobile apps. Flutter is optimized for today's, and tomorrow's, mobile devices. We are focused on low-latency input and high frame rates on Android and iOS.

Community

Join us on IRC at #flutter on Freenode or join our mailing list, sky-dev@googlegroups.com.

Languages
Dart 75%
C++ 16.5%
Objective-C++ 2.9%
Java 2.8%
Objective-C 0.7%
Other 1.9%