2592 Commits

Author SHA1 Message Date
Adam Barth
eaf5e05825 Export overlay.dart
Somehow we missed this one file.
2015-11-02 12:59:15 -08:00
Adam Barth
828775e97e Routes shouldn't be interactive when animating out
This patch introduces the notion of a ModalRoute that puts up a modal barrier
and makes the route invisible to hit testing when its animating out. This patch
also uses this mechanism in a number of places (including PageRoute). There are
still a few more cases to convert, but that's work for a future patch.

Fixes #1684
2015-11-02 12:48:11 -08:00
Kris Giesing
24ea0f0d14 Move velocity tracker to dart 2015-11-02 11:14:17 -08:00
Adam Barth
74d6f33f5a Rename Icon's type paramter to icon
The name of the parameter wasn't consistent with IconButton or DrawerItem, etc.

Fixes #1871
2015-11-01 11:25:17 -08:00
Adam Barth
6ee6ae03c9 Black flash when returning to a PageRoute
We were trying to do a hero animation from a page to itself, which doesn't make
any sense. Now we only render the "to" page offstage if it is different from
the "from" page and if its performance isn't already complete.
2015-10-31 15:36:32 -07:00
Adam Barth
ff1b131814 Teach OverlayEntry how to rebuild in place
This patch makes it so drag-and-drop doesn't thrash the overlay list.
2015-10-29 23:34:05 -07:00
Adam Barth
05f19cfd44 Merge pull request #1881 from abarth/navigator2
Switch to Navigator2
2015-10-29 23:29:20 -07:00
Adam Barth
50a177b7aa Switch to Navigator2 2015-10-29 23:18:56 -07:00
Adam Barth
a7cd12fc19 Remove a number of unused Python scripts
Removes sky_tool and shelldb, which are replaced by the flutter command line
tool.
2015-10-29 20:59:28 -07:00
Adam Barth
4877c06149 Add PageStorage support to Navigator2 2015-10-29 16:24:45 -07:00
Adam Barth
e904ab5773 Add missing import 2015-10-29 13:42:57 -07:00
Adam Barth
9548634bc2 Merge pull request #1866 from abarth/route_types
Add support for modal, ephemeral, and contentless routes to Navigator2
2015-10-29 13:42:20 -07:00
Adam Barth
395184f77f Add hero transition support to Navigator2
In this approach, the hero support is layered on top of the basic navigator
functionality.
2015-10-29 13:29:24 -07:00
Jason Simmons
0a2bfc314f Merge pull request #1861 from jason-simmons/canvas_image_memory_leak_2
simplify the ImageDecoder native code binding
2015-10-29 13:28:04 -07:00
Jason Simmons
f1b048f245 simplify the ImageDecoder native code binding 2015-10-29 13:11:02 -07:00
Adam Barth
fab160cfce Rationalize embedder.dart and shell.dart
This patch combines embedder.dart and shell.dart into one thing. We should now
handle a bunch of error cases better.

  * embedder.connectToApplication has moved to shell.connectToApplication,
    matching the rest of the mojo universe.
  * embedder.connecttoService has moved to shell.connnectToService (and merged
    with shell.requestService).
  * shell.requestService is now shell.connectToService, matching the rest of
    the mojo universe.
  * serviceRegistry has moved from embedder.serviceRegistry to a top-level
    getter.

Fixes #1803
2015-10-29 10:47:34 -07:00
Adam Barth
2e301d4d70 Add support for modal, ephemeral, and contentless routes to Navigator2
Routes can now create a list of widgets, which can be empty (in the case of
contentless routes) or have multiple entries (in the case of modal routes).

Ephemeral routes are handled by keeping a separate list of modal and ephemeral
routes.
2015-10-28 23:18:14 -07:00
Adam Barth
5b3b3dfb3a Merge pull request #1862 from abarth/navigator2
Add an initial implementation of Navigator2
2015-10-28 17:00:12 -07:00
Adam Barth
b991b7d664 Add an initial implementation of Navigator2
This navigator can handle simple page navigation. I'll add more features in
subsequent CLs.
2015-10-28 16:40:22 -07:00
Hans Muller
7de7105fc5 Correct TabNavigatorWidth, tabs.dart example 2015-10-28 16:26:22 -07:00
Hixie
4c9f15cc8b Rev the Dart SDK to pick up better dartdocs 2015-10-28 14:50:19 -07:00
Ian Hickson
6d4221cb95 Merge pull request #1851 from Hixie/MixedViewport-bug
Fix crash when removing a card in card_collection
2015-10-28 14:47:40 -07:00
Collin Jackson
edf5db1943 Merge pull request #1831 from collinjackson/media_query
Media query class for querying viewport dimensions
2015-10-28 14:14:08 -07:00
Hans Muller
1990a3be53 Support dismissing the modal bottom sheet with a drag gesture 2015-10-28 13:08:34 -07:00
Collin Jackson
6c2bbff4ad Media query class for querying viewport information 2015-10-28 12:34:57 -07:00
Hixie
a8a32a972a Fix crash when removing a card in card_collection
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
2015-10-28 10:31:12 -07:00
Adam Barth
af790303c2 Merge pull request #1848 from abarth/icon_size
Icon should use an enum rather than an int for size
2015-10-28 09:13:23 -07:00
Adam Barth
0f9c179e7d Merge pull request #1849 from abarth/rm_edges
Remove unused material edge definition
2015-10-28 09:13:11 -07:00
Adam Barth
eeea4ab7c7 Icon should use an enum rather than an int for size
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
2015-10-28 08:55:49 -07:00
Adam Barth
62336ce4a8 Remove unused material edge definition
The one we actually use is in material.dart.
2015-10-28 07:34:11 -07:00
Adam Barth
3373d0ba01 Switch clients from ui.view to ui.window 2015-10-28 07:16:56 -07:00
krisgiesing
819125913b Merge branch 'master' into tap-fix 2015-10-27 15:24:04 -07:00
Hans Muller
e90dcf8e34 Adds modal bottom sheets: showModalBottomSheet() 2015-10-27 14:57:18 -07:00
Kris Giesing
25ed15773c #1834 Reset tap state after successful tap 2015-10-27 14:47:09 -07:00
Hixie
32ca055f12 Notification of metrics changes.
The Rendering layer binding now multiplexes the dart:ui metrics change
notification so that multiple consumers can all listen to the change.
2015-10-27 14:32:00 -07:00
Adam Barth
1e446ffc28 Add the position at which drags start
Fixes #1807
2015-10-27 14:25:03 -07:00
Adam Barth
dc6366793f Merge pull request #1832 from abarth/tap_position
Add a position to the onTap callback
2015-10-27 14:20:35 -07:00
Adam Barth
2225405fad Add a position to the onTap callback
Fixes #1807
2015-10-27 14:12:54 -07:00
Ian Hickson
8a900f9042 Track scroll position
- 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.
2015-10-27 13:46:07 -07:00
Adam Barth
e77cad81c1 Use VoidCallback in more places
We still use special-purpose typedefs in the gesture code for symmetry with
other gesture callbacks.

Fixes #1827
2015-10-27 11:19:44 -07:00
Adam Barth
7ae730bb2e Merge pull request #1822 from abarth/custom_shifted_box
Add CustomOneChildLayout
2015-10-27 11:10:00 -07:00
Adam Barth
3e27b9b345 Merge pull request #1825 from abarth/tap_tracker
Make TapTracker and TapGesture private classes
2015-10-27 11:09:34 -07:00
Adam Barth
f06559afed Add CustomOneChildLayout
A CustomOneChildLayout is a widget that lets you perform a custom layout in the
simplified setting of sizing and positioning a single child.
2015-10-27 11:04:32 -07:00
Adam Barth
d6dc9d47b8 Use VoidCallback for onPressed and friends
Previous these callbacks were leaking the implementation detail that they were
triggered by taps. In a later patch, we're going to add a parameter to
GestureTapCallback that these callbacks won't have.

Related to #1807
2015-10-27 10:21:10 -07:00
Adam Barth
3fc05b79aa Make TapTracker and TapGesture private classes
We don't want to expose these from the gesture package. This patch moves
DoubleTapGestureRecognizer into tap.dart so we can make TapTracker and
TapGesture private to that file.
2015-10-27 10:08:48 -07:00
Ian Hickson
93622ebd41 Merge pull request #1819 from Hixie/new-enabled-approach
Use the presence of handler to determine 'enabled'
2015-10-27 09:30:34 -07:00
Adam Barth
f35ad64786 Merge pull request #1814 from abarth/fix_right_align
Right-aligned text paints offscreen sometimes
2015-10-26 19:41:24 -07:00
Hixie
d11acc41eb Use the presence of handler to determine 'enabled'
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.
2015-10-26 17:35:41 -07:00
Hixie
a13147d04f Make ink wells animate their highlight. 2015-10-26 17:24:14 -07:00
Adam Barth
69a0689a33 Right-aligned text paints offscreen sometimes
We were assuming that the text extended from 0.0 to its max content width.
That's not correct for right-aligned text. Instead, we need to layout the text
again at the width we want it to occupy.
2015-10-26 15:49:47 -07:00