1. 22 Mar, 2018 1 commit
    • Ian Hickson's avatar
      Clean up the existing Navigator API. (#15718) · aba0379d
      Ian Hickson authored
      This is not a grand refactor yet, it's just cleaning up what we have
      already, so that people who keep using this API (e.g. dialogs) have
      something coherent to deal with.
      
      The major changes are that Navigator and NavigatorState have the same
      API now, that most of the examples use `<void>` instead of `<Null>`,
      that the navigator observer can see replaces, and that the `settings`
      is moved from ModalRoute to Route. I also cleaned up some of the API
      documentation.
      aba0379d
  2. 20 Oct, 2017 1 commit
  3. 11 Oct, 2017 1 commit
  4. 21 Sep, 2017 1 commit
  5. 08 Sep, 2017 1 commit
    • Hans Muller's avatar
      Make an app's supported locales configurable (#11946) · 4262c1e9
      Hans Muller authored
      * Make an app's supported locales configurable
      
      * Added an supportedLocales.isNotEmpty assert
      
      * WidgetsApp no longer const because supportedLocales.isNotEmpty
      
      * updated per review feedback
      
      * tweaked dartdoc to restart the build
      
      * updated per review feedback
      
      * Updated per review feedback
      4262c1e9
  6. 24 Aug, 2017 1 commit
  7. 23 Jun, 2017 1 commit
    • Ian Hickson's avatar
      Deep linking: automatically push the route hiearchy on load. (#10894) · 9adb4a78
      Ian Hickson authored
      The main purpose of this PR is to make it so that when you set the
      initial route and it's a hierarchical route (e.g. `/a/b/c`), it
      implies multiple pushes, one for each step of the route (so in that
      case, `/`, `/a`, `/a/b`, and `/a/b/c`, in that order). If any of those
      routes don't exist, it falls back to '/'.
      
      As part of doing that, I:
      
       * Changed the default for MaterialApp.initialRoute to honor the
         actual initial route.
      
       * Added a MaterialApp.onUnknownRoute for handling bad routes.
      
       * Added a feature to flutter_driver that allows the host test script
         and the device test app to communicate.
      
       * Added a test to make sure `flutter drive --route` works.
         (Hopefully that will also prove `flutter run --route` works, though
         this isn't testing the `flutter` tool's side of that. My main
         concern is over whether the engine side works.)
      
       * Fixed `flutter drive` to output the right target file name.
      
       * Changed how the stocks app represents its data, so that we can
         show a page for a stock before we know if it exists.
      
       * Made it possible to show a stock page that doesn't exist. It shows
         a progress indicator if we're loading the data, or else shows a
         message saying it doesn't exist.
      
       * Changed the pathing structure of routes in stocks to work more
         sanely.
      
       * Made search in the stocks app actually work (before it only worked
         if we happened to accidentally trigger a rebuild). Added a test.
      
       * Replaced some custom code in the stocks app with a BackButton.
      
       * Added a "color" feature to BackButton to support the stocks use case.
      
       * Spaced out the ErrorWidget text a bit more.
      
       * Added `RouteSettings.copyWith`, which I ended up not using.
      
       * Improved the error messages around routing.
      
      While I was in some files I made a few formatting fixes, fixed some
      code health issues, and also removed `flaky: true` from some devicelab
      tests that have been stable for a while. Also added some documentation
      here and there.
      9adb4a78
  8. 21 Mar, 2017 1 commit
  9. 04 Mar, 2017 1 commit
  10. 14 Jun, 2016 2 commits
    • pq's avatar
      Added asserts. · f5a4e632
      pq authored
      f5a4e632
    • pq's avatar
      Add missing returns. · 7a955487
      pq authored
      As of `1.18.0-dev-0`, these cases will get flagged.  In the meantime, the
      7a955487
  11. 07 Jun, 2016 1 commit
  12. 14 Mar, 2016 1 commit
  13. 13 Mar, 2016 1 commit
  14. 12 Mar, 2016 4 commits
  15. 12 Feb, 2016 1 commit
  16. 11 Feb, 2016 1 commit
    • Ian Hickson's avatar
      Clean up imports and exports. · a94999ba
      Ian Hickson authored
      Each layer is supposed to reexport the parts of the previous layer
      that are part of its API.
      
      - In painting.dart, export from dart:ui all the Canvas-related APIs
        that make sense to be used at higher levels, e.g. PaintingStyle.
      
      - Delete painting/shadows.dart. It was dead code.
      
      - In rendering/object.dart, export all of painting.dart.
      
      - In widgets/basic.dart, export all of painting.dart and
        animation.dart. Some classes in animation/ are renamed to make this
        less disruptive and confusing to the namespace.
      
      - Split out Stocks back into an import model rather than a part model,
        so that it's easier to manage its dependencies on a per-file basis.
      
      - Move Ticker to scheduler library.
      
      - Remove as many redundant imports as possible now.
      
      - Some minor nit picking cleanup in various files.
      a94999ba
  17. 27 Jan, 2016 1 commit
  18. 24 Jan, 2016 1 commit
  19. 11 Jan, 2016 2 commits
    • Ian Hickson's avatar
      88c43c3f
    • Ian Hickson's avatar
      Add more debugging options to the stocks app. · 48e1350e
      Ian Hickson authored
      - Add an option to enable debugPaintSizeEnabled.
      - Add an option to enable the StatisticsOverlay.
      - Add support for the StatisticsOverlay in MaterialApp.
      - Change the layout behaviour of RenderStatisticsBox:
         - Give it a zero intrinsic width.
         - Give it an accurate intrinsic height that depends on the flags
           set. (Also, move the enum to the rendering/ layer from the
           widgets/ layer to enable this.)
         - Make the box automatically size itself full-width and the correct
           height, so that you can actually embed it (though most of the
           time you'd just put it in a Stack so this doesn't matter as
           much, really).
      - Some style nit fixes in statistics_box.dart.
      48e1350e
  20. 10 Jan, 2016 1 commit
  21. 08 Jan, 2016 1 commit
  22. 08 Dec, 2015 3 commits
  23. 04 Dec, 2015 1 commit
  24. 03 Dec, 2015 3 commits
    • Hixie's avatar
      Add menu items to stocks to control timeDilation · e249c0ab
      Hixie authored
      e249c0ab
    • 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
    • Hixie's avatar
      buildForwardTransition() · bc5307f5
      Hixie authored
      For those times when you want to do something as you move away from a
      route into the next one, as well as when you move into it from the
      previous one.
      bc5307f5
  25. 11 Nov, 2015 1 commit
  26. 10 Nov, 2015 1 commit
  27. 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
  28. 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
  29. 15 Oct, 2015 1 commit
    • Hixie's avatar
      Improve debugging output · 1f40d96f
      Hixie authored
      Teach dumpRenderTree() to draw actual trees.
      Make the TextStyle output terser so it doesn't overflow the output.
      Make debugDumpApp() say what mode we're in (checked vs release).
      Hide lifecycle state from release mode dumps (since it's checked-only state).
      1f40d96f
  30. 10 Oct, 2015 2 commits