1. 29 Aug, 2015 1 commit
  2. 28 Aug, 2015 4 commits
  3. 27 Aug, 2015 1 commit
  4. 25 Aug, 2015 3 commits
  5. 24 Aug, 2015 1 commit
    • Hans Muller's avatar
      Support ScrollableLists that wrap · c21fcf62
      Hans Muller authored
      Adds itemsWrap:bool (default false) to ScrollableList and PageableList. If itemsWrap is true then scrolling past the last item wraps around to the first. Similarly, scrolling before the first item wraps around to the last.
      
      Added abstract ExtentScrollBehavior of ScrollBehavior. Renamed fields called contentsExtents to contentExtent, containerExtents to containerExtent, contentSize to contentExtent, etc.
      
      BoundedBehavior is now a subclass of ExtentScrollBehavior.
      
      Added UnboundedBehavior subclass of ExtentScrollBehvaior; contentExtent and maxScrollOffset are double.INFINITY, minScrollExtent is double.NEGATIVE_INFINITY.
      c21fcf62
  6. 22 Aug, 2015 2 commits
  7. 21 Aug, 2015 1 commit
    • Adam Barth's avatar
      Rename all the scrollable classes · 010589be
      Adam Barth authored
      Block -> BlockBody
      ScrollableBlock -> Block
      FixedHeightScrollable -> ScrollableWidgetList
      VariableHeightScrollable -> ScrollableMixedWidgetList
      BlockViewport -> MixedViewport
      010589be
  8. 20 Aug, 2015 2 commits
    • Hans Muller's avatar
      Handle changes to scrollDirection in ScrollableList et al · d662f7e6
      Hans Muller authored
      Changed the pageable_list.dart example: tapping on the toolbar changes
      the scroll direction. This exposed some problems:
      
      - Scrollable.syncFields() didn't update scrollDirection
      - Viewport updated its RenderObject fields in the wrong order
      - FixedHeightScrollable scrollDirection changes didn't update the scrollBehavior
      
      There may be similar problems with VariableHeightList and ScrollableViewport.
      I will fix those in a separate CL.
      d662f7e6
    • Adam Barth's avatar
      Fix padding on infinite scrolling list · 72807ef8
      Adam Barth authored
      Rather than using a Padding widget to provide padding along the scrolling axis,
      we now just figure the padding into where we draw the items. This patch fixes
      an issue where we would remove the first topmost item in a scrollable list too
      early because we thought it was already off screen.
      
      Fixes #697
      72807ef8
  9. 19 Aug, 2015 4 commits
    • Hixie's avatar
      The ScrollDirection argument needs a default all the way through. · a9643aea
      Hixie authored
      Fixes the Stocks crash on startup.
      a9643aea
    • Adam Barth's avatar
      Give default scroll directions · bc7256da
      Adam Barth authored
      Fixes tests.
      bc7256da
    • Hans Muller's avatar
      Adds PageableList, other scrolling related changes and fixes · 7782a115
      Hans Muller authored
      - PageableList extends ScrollableList
      One fixed width or height item is visible and centered at a
      time. Fling and drag gestures scroll to the next/previous item.
      
      - Scrollable.scrollTo(), Scrollable.scrollBy(), ensureWidgetIsVisible() API changed
      The named animation parameter for these methods was replaced by
      duration and curve. All of the methods now return a Future. The Future
      completes when the scroll does.
      
      This change eliminates the need for Scrollable to temporarily take ownership
      of a ValueAnimation object (see #645).
      
      - Using Future.then() instead of an AnimationPerformance status listener
      In ensure_visible.dart _handleTap() uses ensureWidgetIsVisible() to
      center the card roughly as before and then. When the implicit scroll
      animation is complete, it changes the centered card's label font. The
      change is made when the Future returned by ensureWidgetIsVisible()
      completes.
      
      - FixedHeightScrollable's itemHeight parameter is now itemExtent
      If scrollDirection is ScrollDirection.vertical (the default) then itemExtent should
      be the height of each item; otherwise it should be the width of each item.
      
      Replaced _velocityForFlingGesture() in scrollable.dart with Scrollable._eventVelocity()
      The original version clamped pixels/ms against pixels/sec constants. The new version
      also deals with scrollDirection.
      
      - Plumbed scrollDirection though FixedHeightScrollable and ScrollableList
      
      Both classes should now support horizontal scrolling.
      7782a115
    • Adam Barth's avatar
      Split box.dart into many files · 50bfdedb
      Adam Barth authored
      Sadly, box.dart has grown much longer than 1000 lines. This patch splits it up
      into several files based on the class hierarchy. Fortunately, many of these
      classes are loosely coupled to each other.
      50bfdedb
  10. 17 Aug, 2015 1 commit
  11. 13 Aug, 2015 1 commit
  12. 11 Aug, 2015 2 commits
    • Hans Muller's avatar
      Adds ensureWidgetIsVisible() function to scrollable.dart · 9e9d845b
      Hans Muller authored
      Set the scrollOffset of a widget's Scrollable ancestor so that the
      widget is centered within the scrollable. A future CL will add
      support for specifying exactly where the widget appears. The scroll
      can be animated by specifying the animation: parameter.
      
      Changed the duration Scrollable.scrollTo() parameter from a Duration
      to an AnimationPerformance so that one can configure all aspects of
      the animation. The caller may also listen to the animation to schedule
      other work while it updates or when its status changes.
      complete
      9e9d845b
    • Hans Muller's avatar
      The IgnorePointer class enables one to cut a widget subtree off from pointer... · d2d9ae13
      Hans Muller authored
      The IgnorePointer class enables one to cut a widget subtree off from pointer events. This is useful when a sibling should not shield pointer events from overlapping siblings below it.
      
      Added a ScrollListener listener to Scrollable. The ScrollListener runs each time the Scrollable's scrollOffset changes. This can be used to keep overlay widgets in sync with a Scrollable below them.
      
      Removed the Scrollable ScrollClient API. It was no longer used and was clumsy to use as a ScrollListener.
      
      Added global function findScrollableAncestor() to scrollable.dart.
      
      Added examples/widgets/overlay_geometry.dart. The app's Scaffold is contained by a Stack. The Stack is used to display green overlay "Markers" at the corners of the most recently selected list item and where the corresponding tap occurred. The app uses widget.localToGlobal() to compute the global overlay positions of the markers. The ScrollListener is used to keep the markers' positions up to date.
      d2d9ae13
  13. 06 Aug, 2015 1 commit
  14. 05 Aug, 2015 1 commit
  15. 04 Aug, 2015 2 commits
    • Adam Barth's avatar
      Rename widgets/widget.dart to widgets/framework.dart · 054ebbf3
      Adam Barth authored
      It was confusing to have both widget.dart and widgets.dart
      054ebbf3
    • James Robinson's avatar
      Teach event system about disposition and make 'consumed' disposition terminal · 53163f8b
      James Robinson authored
      This introduces the notion of event disposition and allows event
      targets (widgets and render objects) to consume events that should not
      be processed further. This is needed by the Switch component in the
      Drawer in the stocks example. The Switch is embedded in a DrawerItem.
      The Switch handles the gesture tap event to toggle its state and should
      handle pointer events to allow swiping and draw its own radial
      reaction. The DrawerItem also handles gesture taps to allow toggling
      the switch value when tapping anywhere on the drawer and to draw its
      own ink splash. When tapping on the switch, both the switch's render
      object and the DrawerItem's listener are in the event dispatch path.
      The Switch needs to signal in some fashion that it consumed the event
      so the DrawerItem does not also try to toggle the switch's state.
      53163f8b
  16. 03 Aug, 2015 1 commit
    • Adam Barth's avatar
      ScrollableBlock should be able to overscroll · 98a2c9b0
      Adam Barth authored
      When a ScrollableBlock can scroll, we want to be able to drag into the
      overscroll region. Previously we could fling into the overscroll region, but we
      couldn't actually drag there.
      98a2c9b0
  17. 30 Jul, 2015 1 commit
  18. 29 Jul, 2015 1 commit
  19. 28 Jul, 2015 3 commits
  20. 22 Jul, 2015 1 commit
    • Hixie's avatar
      Introduce an explicit Key type. · 74575775
      Hixie authored
      This fixes some theoretical bugs whereby we were using hashCode to try
      to get unique keys for objects, but really we wanted object identity.
      It also lays the groundwork for a new GlobalKey concept.
      
      I tried to keep the impact on the code minimal, which is why the "Key"
      constructor is actually a factory that returns a StringKey. The code
      has this class hierarchy:
      
      ```
         KeyBase
          |
         Key--------------+---------------+
          |               |               |
         StringKey    ObjectKey       UniqueKey
      ```
      
      ...where the constructors are Key and Key.stringify (StringKey),
      Key.fromObjectIdentity (ObjectKey), and Key.unique (UniqueKey).
      
      We could instead of factory methods use regular constructors with the
      following hierarchy:
      
      ```
         KeyBase
          |
         LocalKey---------+---------------+
          |               |               |
         Key      ObjectIdentityKey   UniqueKey
      ```
      
      ...with constructors Key, Key.stringify, ObjectIdentityKey, and
      UniqueKey, but I felt that that was maybe a more confusing hierarchy.
      I don't have a strong opinion on this.
      74575775
  21. 16 Jul, 2015 1 commit