1. 12 Nov, 2015 1 commit
  2. 03 Nov, 2015 3 commits
  3. 01 Nov, 2015 1 commit
  4. 28 Oct, 2015 2 commits
    • Hixie's avatar
      Fix crash when removing a card in card_collection · a8a32a97
      Hixie authored
      MixedViewport didn't use the building:true flag when locking itself, so
      when it caused a rebuild of its children, we assumed that nobody was
      allowed to mark things dirty below the list, and things crashed when
      Inherited people did in fact rebuild.
      
      Also:
       - default offset for MixedViewport
       - don't bother rebuilding if the underlying RenderObject is going to
         rebuild anyway for some reason
       - better docs for the "items must have keys" assert
       - keep the FlipComponent stuff together in test_widgets.dart
      a8a32a97
    • Adam Barth's avatar
      Icon should use an enum rather than an int for size · eeea4ab7
      Adam Barth authored
      Material design icons are defined to work at specific sizes: 18, 24, 36, 48.
      The current API doesn't reflect that and just takes a size int. If an invalid
      size is chosen an error is printed to the console and no icon shows up.
      
      Fixes #1816
      eeea4ab7
  5. 27 Oct, 2015 1 commit
    • Hixie's avatar
      Use the presence of handler to determine 'enabled' · d11acc41
      Hixie authored
      Instread of an explicit 'enabled' bool, this uses the presence of the
      event handler to determine if a widget is enabled or not. This means
      that if you've not passed a handler, your widget will be disabled, which
      makes sense, since it wouldn't work anyway.
      
      Adds this feature to checkbox, and ports raised button, flat button, and
      radio buttons to this new model.
      
      Adds a checkbox to card_collection that can be disabled.
      
      Hide a (basically bogus) hint from the (soon to be disabled) strong hint
      mode in the analyzer that this reveals.
      d11acc41
  6. 26 Oct, 2015 2 commits
    • Hixie's avatar
      Radio button 'disabled' state. · c87e9670
      Hixie authored
      Also:
       - give card_collection an option to turn on or off the edit widgets
       - give card_collection an option to control text alignment (when not editing)
       - give card_collection a "dump" option to aid debugging
       - make the gesture detector report which gestures it is listening to
      c87e9670
    • Hixie's avatar
      Radio<T> and ValueChanged<T> · b1dbf452
      Hixie authored
      Make Radio widgets take a type that describes the type of their value,
      so that you can catch when you use the wrong value.
      
      Standardise on ValueChanged<Foo> instead of having a FooValueChanged
      for every value of Foo.
      b1dbf452
  7. 24 Oct, 2015 1 commit
    • Hixie's avatar
      Strong modeify the examples · a6c473ea
      Hixie authored
      This makes skyanalyzer also check the examples, and fixes everything it
      found there.
      a6c473ea
  8. 22 Oct, 2015 1 commit
    • Adam Barth's avatar
      Add Navigator.of · de395582
      Adam Barth authored
      Now you don't need to pass the navigator around everywhere.
      de395582
  9. 20 Oct, 2015 1 commit
  10. 19 Oct, 2015 1 commit
  11. 10 Oct, 2015 3 commits
  12. 09 Oct, 2015 2 commits
  13. 07 Oct, 2015 1 commit
    • Hixie's avatar
      HomogeneousViewport support for Theme.of() · d45bf145
      Hixie authored
      Previously, RenderObjectElements didn't support being marked dirty. This
      is fine, except for MixedViewport and HomogeneousViewport, which have
      builder functions to which they hand themselves as a BuildContext. If
      those builder functions call, e.g., Theme.of(), then when the theme
      changes, the Inherited logic tries to tell the RenderObjectElement
      object that its dependencies changed and that doesn't go down well.
      
      This patch fixes this by making RenderObjectElement a BuildableElement,
      and making MixedViewport and HomogeneousViewport hook into that to
      rebuild themselves appropriately.
      
      Also, this was only found at all because ThemeData didn't implement
      operator==, so we were aggressively marking the entire tree dirty all
      the time. That's fixed here too.
      
      Also, I changed card_collection.dart to have more features to make this
      easier to test. This found bugs #1524, #1522, #1528, #1529, #1530, #1531.
      d45bf145
  14. 06 Oct, 2015 1 commit
    • Adam Barth's avatar
      Simplify Scaffold · 89a09822
      Adam Barth authored
      Rather than using a custom render object, we can just use a Stack.
      89a09822
  15. 05 Oct, 2015 2 commits
    • Hixie's avatar
      Simplify the usage of Navigator's routes argument · 90a0f630
      Hixie authored
      (These are changes cherry-picked from in-flight branches since they are
      more independent and could be helpful even without those changes.)
      
      - Change RouteBuilder's signature to take a single argument in which the
        other fields are placed, so that we can keep iterating on those
        arguments without having to break compatibility each time. Also, this
        makes defining route builders much simpler (only one argument to
        ignore rather than a variable number).
      
      - Expose the next performance to RouteBuilders, since sometimes the
        route itself might not be where it's used.
      
      - Allow BuildContext to be used to walk children, just like it can for
        ancestors
      
      - Allow BuildContext to be used to get the Widget of the current
        BuildContext
      
      - Allow StatefulComponentElement to be referenced with a type
        specialisation so that you don't have to cast when you know what the
        type you're dealing with actually is.
      90a0f630
    • Adam Barth's avatar
      Convert Drawer to using navigator · 49c47876
      Adam Barth authored
      This patch converts drawer to using the "openDialog" pattern for managing its
      state. Currently, the drawer entrance and exit animation aren't integrated with
      the navigator's animation system because the drawer's animations can be stopped
      and reversed, which the navigator can't yet understand. That means dismissing
      the drawer via the system back button causes the drawer to be removed
      instanteously.
      
      Fixes #715
      Fixes #1187
      49c47876
  16. 03 Oct, 2015 1 commit
    • Hans Muller's avatar
      ShaderMask · 4de0a99b
      Hans Muller authored
      The ShaderMask widget enables rendering its child with an alpha channel defined by a Shader. For example if the Shader was a linear gradient in alpha then the component behind the ShaderMask's child would appear wherever the gradient's alpha value was not fully opaque.
      
      The card_collection.dart example demonstrates this. Select the "Let the sun shine" checkbox in the app's drawer.
      4de0a99b
  17. 01 Oct, 2015 1 commit
  18. 30 Sep, 2015 2 commits
  19. 29 Sep, 2015 1 commit
    • Hans Muller's avatar
      SnapOffsets for fling Scrolling · 7385641f
      Hans Muller authored
      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.
      7385641f
  20. 25 Sep, 2015 1 commit
  21. 18 Sep, 2015 1 commit
    • Adam Barth's avatar
      Move theme into material.dart · 4467a268
      Adam Barth authored
      Also, introduce Colors and Typography to hold the material colors and the
      typography declarations. Previously we expected clients of these libraries to
      import them into a namespace, but that doesn't play nice with re-exporting them
      from material.dart.
      4467a268
  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. 04 Sep, 2015 2 commits
    • Hans Muller's avatar
      Add Dismissable unit tests · b02531a9
      Hans Muller authored
      b02531a9
    • Hans Muller's avatar
      Add Dismissable support for DismissDirection · 4e01c054
      Hans Muller authored
      ```
      enum DismissDirection {
        vertical,
        horizontal,
        left,
        right,
        up,
        down
      }
      ```
      
      To only enable dismissing to the right create the `Dismissable` with `direction: DismissDirection.right`. By default direction is `DismissDirection.horizontal` (left or right).
      
      Updated the card_collection "Swipe Away" demo with a drawer that can be used to select one of the three X axis dismiss directions. Currently the MixedViewport class doesn't support horizontal scrolling, so the demo doesn't support the X axis dismiss directions.
      4e01c054
  24. 03 Sep, 2015 1 commit
  25. 28 Aug, 2015 1 commit
    • Hixie's avatar
      Rationalise the Key API. · 9047830c
      Hixie authored
      Add a way of having keys based on numeric types or DateTimes by having a ValueKey<T> class.
      Remove the redundant ways of declaring things, except for leaving one shorthand -- you can say `new Key(s)` instead of `new ValueKey<String>(s)`.
      9047830c
  26. 26 Aug, 2015 1 commit
    • Hixie's avatar
      Replace Flex to Row and Column in tests and examples. · ce28a717
      Hixie authored
      This still leaves Flex and FlexDirection available. At some point once
      people have transitioned to Row/Column we should rename Flex to _Flex
      and stop reexporting FlexDirection from basic.dart.
      ce28a717
  27. 21 Aug, 2015 2 commits
  28. 20 Aug, 2015 1 commit
  29. 19 Aug, 2015 1 commit
    • Adam Barth's avatar
      Add package:sky/rendering.dart · dea3a092
      Adam Barth authored
      Similar to widgets.dart, rendering.dart exports the entire rendering layer.
      Also, update the examples to use rendering.dart and widgets.dart. Also clean up
      some exports so that the examples have more sensible imports.
      dea3a092