1. 08 Dec, 2015 2 commits
    • Adam Barth's avatar
      Widgets that depend on Material should assert that · 8dc607a9
      Adam Barth authored
      After this patch, if you try to use a widget that depends on being enclosed in
      a material, you now get an assert and a debugPrint if you're not inside a
      material.
      
      Fixes #243
      8dc607a9
    • Ian Hickson's avatar
      Make BoxDecoration replaceable. · 2afa87df
      Ian Hickson authored
      Factor out a reusable interface called Decoration from BoxDecoration.
      
      Make all the consumers of BoxDecoration and the erstwhile BoxPainter
      into consumers of Decoration.
      
      Make a BoxPainter be something you get from a Decoration, rather than
      something to which you pass a BoxDecoration.
      
      Rename Shape to BoxShape now that it's documented specifically as
      applying to boxes.
      
      Move EdgeDims to its own file.
      
      Move FractionalOffset up so that it's with the other helper classes in
      its file rather than alone at the end.
      
      Minor change to RenderClipOval's hit testing to avoid taking an
      unnecessary square root.
      
      Rename BoxDecorationPosition to DecorationPosition since
      RenderDecoratedBox now takes any Decoration.
      
      Implement hit testing for rounded rects.
      
      Rename AnimatedBoxDecorationValue to AnimatedDecorationValue, and make
      it support lerping across any Decoration (by deferring to the objects
      involved).
      2afa87df
  2. 04 Dec, 2015 1 commit
    • Adam Barth's avatar
      Improve material ink response · 0608a02a
      Adam Barth authored
      This patch contains a number of improvements to the material ink response:
      
      - The ink response now remains until you lift your finger
      - When disappearing, the ink response now fades out
      - The ink response is now the correct color (at least in the light theme)
      - The ink response for IconButton now has a (circular) highlight
      - The ink response for IconButton now repositions itself to be centered on the highlight
      
      In addition, I've adjusted the various animation parameters to better match the
      behavior of ink responses in the Java implementation of material.
      
      Fixes #695
      0608a02a
  3. 01 Dec, 2015 1 commit
  4. 12 Nov, 2015 1 commit
  5. 11 Nov, 2015 1 commit
  6. 05 Nov, 2015 1 commit
    • Adam Barth's avatar
      Improve hit testing · 9bc64540
      Adam Barth authored
      Now a RenderBox is considered hit if one of its children are hit or it itself
      decides that it's hit. In particular, empty space inside a flex won't be hit
      because none of the children are located there and a RenderFlex doesn't
      consider itself hittable.
      
      Fixes #53
      Fixes #1221
      9bc64540
  7. 03 Nov, 2015 1 commit
  8. 27 Oct, 2015 2 commits
  9. 26 Oct, 2015 1 commit
  10. 20 Oct, 2015 1 commit
  11. 16 Oct, 2015 1 commit
  12. 13 Oct, 2015 1 commit
  13. 10 Oct, 2015 3 commits
  14. 09 Oct, 2015 1 commit
  15. 08 Oct, 2015 1 commit
  16. 06 Oct, 2015 1 commit
  17. 05 Oct, 2015 1 commit
  18. 03 Oct, 2015 2 commits
    • Adam Barth's avatar
      RenderInkWell should use gestures · cf889934
      Adam Barth authored
      After this patch, InkWell is driven by gesture recognizers, which lets us
      cleanly cancel splashes when the user actually scrolls.
      
      I've also refactored all the clients of InkWell to use InkWell to detect
      gestures instead of wrapping InkWell in a GestureDetector.
      
      Fixes #1271
      cf889934
    • Adam Barth's avatar
      Clean up some style in GestureDetector · 426ce937
      Adam Barth authored
       * Rename GestureTapListener (and friends) To GestureTapCallback to match the
         other gesture callbacks.
       * Replace "ensureFoo" pattern with ??= operator.
      426ce937
  19. 01 Oct, 2015 1 commit
  20. 22 Sep, 2015 1 commit
  21. 21 Sep, 2015 1 commit
    • Adam Barth's avatar
      Remove EventDisposition · 051354ae
      Adam Barth authored
      All the use cases for EventDisposition are now addressed by the gesture
      detection system.
      051354ae
  22. 08 Sep, 2015 1 commit
    • Adam Barth's avatar
      Introduce package:sky/animation.dart · b356d146
      Adam Barth authored
      Move the animation libraries into src/animation and change importers to use
      package:sky/animation.dart. Also, move scheduler.dart into the animation
      library so that the animation library can be self-contained.
      b356d146
  23. 02 Sep, 2015 1 commit
    • Adam Barth's avatar
      Move widgets and rendering inside src · 693ddcd8
      Adam Barth authored
      Code outside of package:sky should import this code using
      
      package:sky/rendering.dart
      package:sky/widgets.dart
      
      Moving this code into the "src" directory is a convention that signifies that
      and it cleans up the generated dartdoc because the libraries in the src
      directory aren't included in the generated documentation. Instead, the classes
      are documented in the widgets.dart and rendering.dart libraries.
      693ddcd8
  24. 19 Aug, 2015 1 commit
    • 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
  25. 17 Aug, 2015 1 commit
  26. 13 Aug, 2015 1 commit
  27. 11 Aug, 2015 1 commit
  28. 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
  29. 28 Jul, 2015 2 commits
  30. 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
  31. 21 Jul, 2015 1 commit
  32. 16 Jul, 2015 1 commit