1. 16 Dec, 2015 1 commit
  2. 08 Dec, 2015 1 commit
  3. 07 Dec, 2015 3 commits
    • Hixie's avatar
      didChangeNext() · 18d5c5e7
      Hixie authored
      Replace didPushNext() and didReplaceNext() with didChangeNext(), and
      call it in more cases, so that a route can easily track the next route.
      
      Use this to make TransitionRoute properly track its next route so that
      you can do next-route-driven animations that work even with removes,
      replaces, and other crazy manipulations of the navigator stack.
      18d5c5e7
    • Hixie's avatar
      Navigator.popUntil · cf3077ea
      Hixie authored
      This was already supported in the underlying classes but somehow not
      exposed by Navigator itself.
      cf3077ea
    • Adam Barth's avatar
      The intial route shouldn't run its entrance animation · ba936c0f
      Adam Barth authored
      Instead, it should enter the world fully formed.
      ba936c0f
  4. 03 Dec, 2015 2 commits
    • Hixie's avatar
      Navigator.canPop(context) · cf7a3b04
      Hixie authored
      cf7a3b04
    • Hixie's avatar
      Let MaterialApp.onGenerateRoute return a Route · df07a69b
      Hixie authored
      Also:
       - minor code reindents in places.
       - reset the widget tree between tests.
       - once you generate a route, don't let its builder change
         (previously it would keep changing as the routes table changed).
       - revert the stocks app toolbar-fading-on-forward-transition thing.
      df07a69b
  5. 30 Nov, 2015 3 commits
  6. 26 Nov, 2015 1 commit
    • Hixie's avatar
      Clean up the Navigator API again. · 88e74693
      Hixie authored
      * Split didPush() into didPush() and install(), so that we can install
        the overlays without triggering the push logic. This will be used in a
        subsequent patch to implement route replacement.
      
      * Split didPop() into didPop() and dispose(), so that we can remove
        overlays without triggering the pop logic. Also for a subsequent patch
        that implements replacement.
      
      * Clean up _navigator on the routes when the Navigator itself is
        disposed.
      
      * Drop the forwarding logic on willPushNext() -- now didPushNext() --
        and didPopNext(), since we no longer have StateRoutes to get in the
        way.
      
      * Implement isCurrent more broadly and without having to keep track of
        state.
      
      * Provide some toString()s on NamedRouteSettings and ModalRoutes.
      
      * Make OverlayState.initState() use the insertAl functionality.
      
      * Make OverlayRoute.builders abstract since that way you'll catch when
        you forget to do it. If you don't want overlays, don't inherit from
        this class.
      
      * Made handleStatusChanged() on TransitionRoute public so that it can be
        overridden by subclasses.
      88e74693
  7. 25 Nov, 2015 1 commit
  8. 24 Nov, 2015 2 commits
  9. 22 Nov, 2015 1 commit
    • Hixie's avatar
      Clean up the term "modal" in the navigator · c51260ac
      Hixie authored
      Now we only use it for things related to ModalRoute and ModalBarrier.
      
      (This is easy now that ephemeral routes are gone, so there's no other
      kind of route to distinguish against.)
      c51260ac
  10. 20 Nov, 2015 3 commits
    • Hixie's avatar
      Route refactor · 6e371875
      Hixie authored
      - Removed the concept of ephemeral routes.
      - Renamed the two _MenuRoutes to _PopupMenuRoute and _DropDownRoute.
      - Added type arguments in various places:
        - DropDownMenu
        - _DropDownRoute
        - _ModalBottomSheetRoute
        - PopupMenuItem
        - _PopupMenu
        - _PopupMenuRoute
      - Made _ModalBottomSheetRoute, the two ex _MenuRoutes, and _DialogRoute
        all inherit from ModalRoute, via PopupRoute.
      - Change "Dropdown" and "DropDown" to "DropDown" consistently.
      - Made MaterialPageRoute inherit from PageRoute.
      - Made ModalBarrier not create a box if it's always transparent.
      - Exposed the Futures on TransitionRoutes.
      - Fixed that menus were no longer dismissable by tapping the modal
        barrier.
      6e371875
    • Hixie's avatar
      Give type arguments to routes. · 13f3a9be
      Hixie authored
      These end up not actually being used, currently, because we don't have
      generic methods, which you'd need for showDialog() and friends, and we
      don't have any way to parameterise a class type at runtime, which you'd
      need for MaterialApp routes, but it's a step in the right direction.
      13f3a9be
    • Hixie's avatar
      Convert Persistent Bottom Sheets to a Scaffold API · 03e094aa
      Hixie authored
      - `Scaffold.of(context).showBottomSheet(widget);`
      - Returns an object with .closed Future and .close() method.
      - Uses a StateRoute to handle back button.
      - Take the Navigator logic out of the BottomSheet widget.
      - Support showing a sheet while an old one is going away.
      - Add Navigator.remove().
      03e094aa
  11. 19 Nov, 2015 1 commit
    • Hixie's avatar
      Snackbar Refactor · 954713ab
      Hixie authored
      "showSnackBar()" is now a feature of a Scaffold. To get to a Scaffold
      you either use a global key (`scaffoldKey.currentState.showSnackBar(...)`),
      or you use `Scaffold.of(context)`.
      
      Snack bars no longer have a route. They are entirely managed by the
      Scaffold. Fixes #432.
      
      Snack bars now queue up when you have several of them. Fixes #374.
      
      Snack bars now auto-size themselves around their contents. This is step
      one towards implementing multiline snack bars.
      
      Snack bars now self-dismiss after some per-snackbar configurable period.
      
      The self-dismissing pauses while a dialog is up above the snackbar (or
      anything that uses ModalRoute). To enable this, there's now a
      `ModalRoute.of(context)` API that returns the current ModalRoute, and
      you will be rebuilt if you asked for this and the route's "current"
      status changes. To implement this, the Navigator now rebuilds
      unconditionally any time it pushes or pops a route.
      
      Snack bars now use the curves that Android uses for snack bars.
      
      Snack bar contents now fade in.
      954713ab
  12. 18 Nov, 2015 1 commit
    • Hixie's avatar
      Pave the Foo.of() cowpath. · 65d81451
      Hixie authored
      I'm planning on adding more .of() functions and so to avoid further
      copypasta I'm providing some general utility functions here.
      65d81451
  13. 17 Nov, 2015 1 commit
  14. 16 Nov, 2015 1 commit
    • Hixie's avatar
      Move Material page animations to Material layer. · 309d25d4
      Hixie authored
      PageRoute is now MaterialPageRoute.
      
      This also changes the following:
      
      - Now the HeroController is a Navigator observer, rather than a feature
        of HeroPageRoutes, which are gone. This means heroes can work between
        any kind of ModalRoute now.
      
      - ModalPageRoute is moved from modal_barrier.dart to routes.dart.
      
      - It allows routes to opt-out of their modal barrier being a shortcut to
        popping the route.
      
      - Features of PageRoute that aren't Material-specific get promoted to
        ModalRoute features: storage, the subtree key, offstageness...
      
      The AnimatedModalBarrier is still a ModalRoute feature.
      309d25d4
  15. 06 Nov, 2015 2 commits
  16. 05 Nov, 2015 1 commit
    • Hixie's avatar
      Better asserts for MaterialApp and Navigator · 88314077
      Hixie authored
      - runApp(new MaterialApp()) was crashing long after the constructor. Now
        it asserts in a more useful location.
      - remove the default name for NamedRouteSettings. It was unused anyway.
      88314077
  17. 30 Oct, 2015 1 commit
  18. 27 Oct, 2015 1 commit
    • Ian Hickson's avatar
      Track scroll position · 8a900f90
      Ian Hickson authored
      - Change RouteArguments to pass the route's BuildContext rather than
        the Navigator. This caused the bulk of the examples/ and .../test/
        changes (those are mostly mechanical changes). It also meant I could
        simplify Navigator.of().
      
      - Make initState() actually get called when the State's Element is in
        the tree, so you can use Foo.of() functions there. Added a test for
        this also.
      
      - Provide a RouteWidget so that routes have a position in the Widget
        tree. The bulk of the route logic is still in a longer-lived Route
        object for now.
      
      - Make Route.setState() only rebuild the actual route, not the whole
        navigator.
      
      - Provided a Route.of().
      
      - Provided a Route.writeState / Route.readState API that tries to
        identify the clients by their runtimeType, their key, and their
        ancestors keys, up to the nearest ancestor with a GlobalKey.
      
      - Made scrollables hook into this API to track state. Added a test to
        make sure this works.
      
      - Fix the debug output of GestureDetector and the hashCode of
        MixedViewport.
      
      - Fixed ScrollableWidgetListState<T> to handle infinite lists.
      8a900f90
  19. 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
  20. 21 Oct, 2015 3 commits
    • Hixie's avatar
      Heroes · fa8c4515
      Hixie authored
      fa8c4515
    • Hixie's avatar
      Debug grid over the navigator stack · 4ab07201
      Hixie authored
      This grid makes it significantly easier to track down errors when you're
      looking at coordinates in a render tree dump and want to see if they're
      what you expect or if they're wildly away from the right location.
      4ab07201
    • Hixie's avatar
      Make Route.build() arguments match RouteBuilder() · babba2f0
      Hixie authored
      Assert at build time that PageRoute route builders do not return null
      widget trees.
      
      Also very minor new code comments and code reorg to help make the heroes
      patch easier to review.
      
      (These are changes that are unrelated to Heroes but that were part of
      the Heroes patch.)
      babba2f0
  21. 20 Oct, 2015 2 commits
  22. 10 Oct, 2015 1 commit
  23. 09 Oct, 2015 2 commits
  24. 08 Oct, 2015 2 commits
  25. 07 Oct, 2015 2 commits
    • 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
    • Adam Barth's avatar
      Separate Route and PerformanceRoute · 30d16e24
      Adam Barth authored
      This patch prepares us to create routes that control their performances more
      closely.
      30d16e24