1. 19 Nov, 2016 1 commit
  2. 06 Oct, 2016 1 commit
  3. 26 Sep, 2016 1 commit
    • Ian Hickson's avatar
      Turn off AnimationControllers when not in use (#5902) · 9e673853
      Ian Hickson authored
      This requires all AnimationController objects to be given a
      TickerProvider, a class that can create the Ticker.
      
      It also provides some nice mixins for people who want to have their
      State provide a TickerProvider. And a schedulerTickerProvider for those
      cases where you just want to see your battery burn.
      
      Also, we now enforce destruction order for elements.
      9e673853
  4. 02 Sep, 2016 1 commit
  5. 16 Aug, 2016 1 commit
  6. 04 Jul, 2016 1 commit
  7. 01 Jul, 2016 1 commit
  8. 16 Jun, 2016 1 commit
    • Ian Hickson's avatar
      Refactor everything to do with images (#4583) · 2dfdc840
      Ian Hickson authored
      Overview
      ========
      
      This patch refactors images to achieve the following goals:
      
      * it allows references to unresolved assets to be passed
        around (previously, almost every layer of the system had to know about
        whether an image came from an asset bundle or the network or
        elsewhere, and had to manually interact with the image cache).
      
      * it allows decorations to use the same API for declaring images as the
        widget tree.
      
      It requires some minor changes to call sites that use images, as
      discussed below.
      
      Widgets
      -------
      
      Change this:
      
      ```dart
            child: new AssetImage(
              name: 'my_asset.png',
              ...
            )
      ```
      
      ...to this:
      
      ```dart
            child: new Image(
              image: new AssetImage('my_asset.png'),
              ...
            )
      ```
      
      Decorations
      -----------
      
      Change this:
      
      ```dart
            child: new DecoratedBox(
              decoration: new BoxDecoration(
                backgroundImage: new BackgroundImage(
                  image: DefaultAssetBundle.of(context).loadImage('my_asset.png'),
                  ...
                ),
                ...
              ),
              child: ...
            )
      ```
      
      ...to this:
      
      ```dart
            child: new DecoratedBox(
              decoration: new BoxDecoration(
                backgroundImage: new BackgroundImage(
                  image: new AssetImage('my_asset.png'),
                  ...
                ),
                ...
              ),
              child: ...
            )
      ```
      
      DETAILED CHANGE LOG
      ===================
      
      The following APIs have been replaced in this patch:
      
      * The `AssetImage` and `NetworkImage` widgets have been split in two,
        with identically-named `ImageProvider` subclasses providing the
        image-loading logic, and a single `Image` widget providing all the
        widget tree logic.
      
      * `ImageResource` is now `ImageStream`. Rather than configuring it with
        a `Future<ImageInfo>`, you complete it with an `ImageStreamCompleter`.
      
      * `ImageCache.load` and `ImageCache.loadProvider` are replaced by
        `ImageCache.putIfAbsent`.
      
      The following APIs have changed in this patch:
      
      * `ImageCache` works in terms of arbitrary keys and caches
        `ImageStreamCompleter` objects using those keys. With the new model,
        you should never need to interact with the cache directly.
      
      * `Decoration` can now be `const`. The state has moved to the
        `BoxPainter` class. Instead of a list of listeners, there's now just a
        single callback and a `dispose()` method on the painter. The callback
        is passed in to the `createBoxPainter()` method. When invoked, you
        should repaint the painter.
      
      The following new APIs are introduced:
      
      * `AssetBundle.loadStructuredData`.
      
      * `SynchronousFuture`, a variant of `Future` that calls the `then`
        callback synchronously. This enables the asynchronous and
        synchronous (in-the-cache) code paths to look identical yet for the
        latter to avoid returning to the event loop mid-paint.
      
      * `ExactAssetImage`, a variant of `AssetImage` that doesn't do anything clever.
      
      * `ImageConfiguration`, a class that describes parameters that configure
        the `AssetImage` resolver.
      
      The following APIs are entirely removed by this patch:
      
      * `AssetBundle.loadImage` is gone. Use an `AssetImage` instead.
      
      * `AssetVendor` is gone. `AssetImage` handles everything `AssetVendor`
        used to handle.
      
      * `RawImageResource` and `AsyncImage` are gone.
      
      The following code-level changes are performed:
      
      * `Image`, which replaces `AsyncImage`, `NetworkImage`, `AssetImage`,
        and `RawResourceImage`, lives in `image.dart`.
      
      * `DecoratedBox` and `Container` live in their own file now,
        `container.dart` (they reference `image.dart`).
      
      DIRECTIONS FOR FUTURE RESEARCH
      ==============================
      
      * The `ImageConfiguration` fields are mostly aspirational. Right now
        only `devicePixelRatio` and `bundle` are implemented. `locale` isn't
        even plumbed through, it will require work on the localisation logic.
      
      * We should go through and make `BoxDecoration`, `AssetImage`, and
        `NetworkImage` objects `const` where possible.
      
      * This patch makes supporting animated GIFs much easier.
      
      * This patch makes it possible to create an abstract concept of an
        "Icon" that could be either an image or a font-based glyph (using
        `IconData` or similar). (see
        https://github.com/flutter/flutter/issues/4494)
      
      RELATED ISSUES
      ==============
      
      Fixes https://github.com/flutter/flutter/issues/4500
      Fixes https://github.com/flutter/flutter/issues/4495
      Obsoletes https://github.com/flutter/flutter/issues/4496
      2dfdc840
  9. 07 Jun, 2016 1 commit
  10. 17 May, 2016 1 commit
  11. 12 May, 2016 1 commit
  12. 04 May, 2016 1 commit
    • Adam Barth's avatar
      Add missing dartdocs from material.dart (#3709) · 7712e583
      Adam Barth authored
      Making progress towards document all public APIs in material.dart. We're still
      missing a few odds and ends (as well as missing docs in tabs.dart,
      tooltip.dart, and two_level_list.dart).
      7712e583
  13. 03 May, 2016 1 commit
  14. 13 Apr, 2016 1 commit
    • Ian Hickson's avatar
      Fix dependency skew. (#3306) · 7861d029
      Ian Hickson authored
      ...by adding tests to our examples that don't import flutter_test, which
      pins the relevant dependencies.
      
      Also, provide more information when complaining about leaked transient
      callbacks in tests.
      
      Also, make tests display full information when they have an exception,
      by bypassing the throttling we have for Android logging in tests.
      
      Also, make the word wrapping not wrap stack traces if they happen to
      be included in exception output.
      
      Also, fix a leaked transient callback in the checkbox code.
      7861d029
  15. 31 Mar, 2016 1 commit
    • Adam Barth's avatar
      Polish selection controls · dca4e4aa
      Adam Barth authored
      The touch ripple now starts at the touch location instead of being
      centered on the widget.
      
      Fixes #2652
      dca4e4aa
  16. 14 Mar, 2016 1 commit
  17. 27 Feb, 2016 1 commit
    • Adam Barth's avatar
      Remove AnimationDirection · 3bbeee7b
      Adam Barth authored
      This concept is now private to AnimationController. All the clients actually
      want the AnimationStatus.
      3bbeee7b
  18. 25 Feb, 2016 1 commit
    • Adam Barth's avatar
      Remove PointerRouter and GestureArena arguments · 4b1a9ff1
      Adam Barth authored
      There's no reason to make clients supply a PointerRounter and a
      GestureArena when constructing gesture recognizers. These objects are
      statics and the gesture recognizers can just grab them directly.
      
      Also, remove the callback constructor arguments. Almost no code used
      them. Instead, people seem to prefer using the `..` operator to set
      callbacks on the recognizers. Removing the arguments removes a bunch of
      boilerplate.
      4b1a9ff1
  19. 27 Jan, 2016 1 commit
  20. 20 Jan, 2016 2 commits
    • Adam Barth's avatar
      Remove Performance and AnimatedValue · b988a875
      Adam Barth authored
      This patch removes Performance and AnimationValue now that we've ported the
      framework over to AnimationController and Tween. This patch also cleans up the
      names of the AnimationController classes now that they don't have to avoid
      conflicts with the old animation API. Specifically, I've made the following
      renames:
      
       * Animated -> Animation
       * Evaluatable -> Animatable
       * PerformanceStatus -> AnimationStatus
      
      This patch is just renames and moving code around. There aren't any changes in
      behavior.
      b988a875
    • Adam Barth's avatar
      Finish porting material.dart to AnimationController · 08b27fd7
      Adam Barth authored
      After this patch, there aren't any direct uses of Performance in material.dart.
      08b27fd7
  21. 14 Dec, 2015 2 commits
  22. 05 Dec, 2015 1 commit
    • Ian Hickson's avatar
      PointerInput refactor · f1625556
      Ian Hickson authored
      Instead of PointerInputEvent having a "type" field, we now have a
      different class for each pointer type.
      
      This has ripple effects throughout the system.
      
      I also did code cleanup in affected files while I was there.
      f1625556
  23. 26 Nov, 2015 3 commits
  24. 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
  25. 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
  26. 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
  27. 20 Oct, 2015 1 commit
  28. 13 Oct, 2015 1 commit
  29. 10 Oct, 2015 3 commits
  30. 09 Oct, 2015 1 commit
    • Hixie's avatar
      Relative paths in internal flutter libraries · 37bda251
      Hixie authored
      Now that you import a top-level file for each layer of the Flutter
      framework, within the framework we can use relative paths without being
      worried about the copy/pasta problem we used to have.
      37bda251
  31. 05 Oct, 2015 1 commit
  32. 03 Oct, 2015 1 commit
    • 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
  33. 30 Sep, 2015 1 commit
    • Hixie's avatar
      Simplify AnimationPerformance · 3b62185f
      Hixie authored
      AnimationPerformance had some logic for supporting multiple variables
      that was hardly ever used. ValueAnimation, a subclass, has logic for
      handling a single variable. I've removed the logic for handling
      variables from AnimationPerformance in favour of most call sites instead
      using ValueAnimation.
      3b62185f
  34. 28 Sep, 2015 1 commit
    • Hixie's avatar
      Make the checkbox in the stocks popup menu work. · 066768f0
      Hixie authored
      Tapping on the menu item didn't animate the checkbox because the menu
      takes 300ms to animate entirely away while the checkbox takes 200ms to
      animate checked, and since the item with the checkbox was at the bottom,
      we were only seeing about 60ms of the entire checkbox animation, which
      isn't enough to notice it. So I moved it to the top of the menu.
      
      Tapping on the checkbox didn't animate because nothing caused the menu
      to rebuild when the callback was invoked. To trigger a rebuild, I now
      call navigator.setState() explicitly, after changing out local state.
      
      To make tapping the checkbox remove the menu, I also explicitly call
      navigator.pop() in the code that handles the check. (I still explicitly
      change the checkbox to show that that's possible. In principle one could
      just treat the checkbox as an inert widget that happens to trigger pop,
      and do all the checking/unchecking in the switch statement.)
      
      I also made some minor style tweaks to files I was looking at while
      dealing with this issue.
      066768f0