455 Commits

Author SHA1 Message Date
Adam Barth
beb8afa456 Switch to the assets plugin (#6408)
This patch removes our dependency on asset_bundle.mojom.
2016-10-19 22:04:56 -07:00
Adam Barth
c08ea4eb33 Switch to TextInputPlugin (#6392)
This patch removes uses of keyboard.mojom in favor of the
TextInputPlugin.
2016-10-19 15:53:31 -07:00
Matt Perry
d39eb84ac4 Add a maxLines parameter for multiline Input. (#6328)
If maxLines is 1, it's a single line Input that scrolls horizontally.
Otherwise, overflowed text wraps and scrolls vertically, taking up at
most `maxLines`.

Also fixed scrolling behavior so that the Input scrolls ensuring the
cursor is always visible.

Fixes https://github.com/flutter/flutter/issues/6271
2016-10-19 17:18:16 -04:00
Matt Perry
97dbd9eacf Rename RawInputLine to RawInput, and RenderEditableLine to RenderEdit… (#6401)
They support multiline text now.
2016-10-19 17:17:51 -04:00
Hans Muller
9eef853580 Update Android scrolling physicsAndroid physics (#6391) 2016-10-19 09:08:54 -07:00
Adam Barth
2cfc040572 Add TextInput class for interacting with the IME (#6386)
This class will eventually replace the Keyboard class we currently use. As part
of this migration, we'll switch from using mojom to interact with the IME to
using platform messages.
2016-10-18 22:41:09 -07:00
Adam Barth
88cf68c847 Migrate Clipboard to platform messages (#6367)
The platform plugin now supports clipboard operations.
2016-10-18 10:04:17 -07:00
Adam Barth
48690d7c2e Add support for persistent footer buttons (#6345)
Fixes #616
2016-10-17 12:50:47 -07:00
Adam Barth
63e7a0e80a Add BuildContext.size as a convenience getter (#6355)
Developers need to get the size of the BuildContext sufficiently often
that we should provide a convenient getter for the value. Having this
getter is also an opportunity to catch common mistakes and provide
useful error messages that guide developers towards better patterns.

Fixes #2321
2016-10-17 12:33:11 -07:00
Adam Barth
4052a36677 Test what context the overlay entries build in (#6337)
Fixes #6245
2016-10-17 11:17:08 -07:00
Adam Barth
61240fe8c6 Tap above LongPressDraggable should work (#6348)
Previously, we were nulling out the ArenaEntry in MultiDragPointerState
too early, which was prevent MultiDragPointerState from rejecting the
gesture in `dispose` if we hadn't accepted by the time the pointer went
up. Now we properly reject the gesture, which causes the tap gesture to
win during `sweep` in the arena.

Also, add a bunch of docs and annotations based on information I learned
while studying this issue. Finally, rename a private member of tap
recognizer to a name that would have confused me less in my
investigation.

Fixes #1186
2016-10-17 10:05:28 -07:00
Adam Barth
6399a3af41 Fix DropdownButton regression (#6353)
When I changed how routes complete their futures, I broke the Dropdown
button because it was still waiting for its own Completer to complete
instead of using the Future returned by push. This patch fixes that
issue.

I've also removed the previous behavior of the DropdownButton forwarding
its text style to its route. The mechansim that we were using doesn't
work properly in all cases. For example, if the DropdownButton is a
child of a LayoutBuilder, then the route will have already built by the
time the DropdownButton gets a chance to forward its text style, causing
an assert in setState.

Finally, I've tweaked PopupMenuButton to work the same way as
DropdownButton in a couple corner cases (e.g., not calling the changed
callback if the button was removed from the tree before the menu
completed its Future).

Fixes #6352
2016-10-17 10:00:48 -07:00
Adam Barth
06babb2898 Removing a Draggable during a drag should work (#6341)
Previously we would maroon the feedback in the overlay. Now we let the
drag proceed and only tear down the gesture recognizer when all the
drags it spawns have been resolved.

Fixes #6151
2016-10-15 18:31:14 -07:00
Adam Barth
1262833377 Support zero for Draggable.maxSimultaneousDrags (#6342)
This patch also makes it possible for a single DragTarget to handle
multiple draggables with the same data without asserting.

Fixes #6086
2016-10-15 18:25:25 -07:00
Adam Barth
ea3c3f53a5 Add Draggable.onDragStarted (#6343)
Fixes #6084
2016-10-15 13:03:31 -07:00
Adam Barth
034d2fcd5d Ensure delayed multidrag timer is stopped (#6340)
Previously we were relying on the gesture arena to call us back to
cancel our timer. However, in the case where we've already been
accepted, asking the gesture arena to reject us doesn't lead to a
callback and we fail to stop the timer (and hence trigger an assert).

Fixes #6156
2016-10-15 13:02:38 -07:00
Hans Muller
f167efba49 Tweaked scroll simulation for iOS platform (#6334) 2016-10-14 20:09:19 -07:00
Adam Barth
ffe14b0d27 Navigator.push and Navigator.pushNamed should return Futures (#6333)
These futures complete when the route is popped off the navigator. This
generalizes and simplifies a mechanism already in place for dialogs and
menus.

Fixes #5283
2016-10-14 16:05:45 -07:00
Adam Barth
93d757c3e0 Dismissable should cull and clip background (#6325)
When not dismissing, the Dismissable widget should cull its background.
When a dismiss is in progress, it should clip the background to just the
part that is revealed.

Fixes #6127
2016-10-14 13:32:56 -07:00
Matt Perry
c13a6e275b Add a maxLines parameter for multiline Input. (#6310)
* Add a maxLines parameter for multiline Input.

If maxLines is 1, it's a single line Input that scrolls horizontally.
Otherwise, overflowed text wraps and scrolls vertically, taking up at
most `maxLines`.

Also fixed scrolling behavior so that the Input scrolls ensuring the
cursor is always visible.

Fixes https://github.com/flutter/flutter/issues/6271

* oops

* comments

* import

* test and RO.update fix

* constant

* fix.caretRect
2016-10-13 21:59:50 -04:00
Adam Barth
3b56f12219 Fix composited transform bounds calculations (#6302)
We weren't computing the bounds for composited transforms correctly. We
need to conjugate the transform by the offset in order to get the
correct paint bounds for the composited layer. We now also use the same
math in the non-composited case for consistency.

Also, don't scale the z-coordinate in RenderFittedBox.

Fixes #6293
2016-10-13 15:00:34 -07:00
Adam Barth
3f19b2db98 Switch to using PlatformPlugin instead of mojom (#6292)
* Switch to using PlatformPlugin instead of mojom

* Update engine.version
2016-10-13 02:10:32 -07:00
Adam Barth
f5b9d388cd Switch to the new semantics backend (#6259)
This match switches the framework to use the semantics backend in `dart:ui`
rather than the Mojo backend.
2016-10-11 10:51:41 -07:00
Adam Barth
2c21d795a4 Deploy @checked (#6244)
This patch adds `@checked` everywhere is needed to remove the
`strong_mode_invalid_method_override` strong mode error.
2016-10-07 11:27:54 -07:00
Jason Simmons
90504b122c Adjust the IconButton constraint to match its size (#6226)
Fixes https://github.com/flutter/flutter/issues/5763
2016-10-06 10:13:53 -07:00
Matt Perry
2fd78dcc53 Add multiline support to Input and friends. (#6155)
Fixes https://github.com/flutter/flutter/issues/6154
2016-10-05 15:46:48 -04:00
Hans Muller
e2ff169d5b Have the scale gesture callback uses details objects (#6204) 2016-10-04 12:44:36 -07:00
Hans Muller
596637ade4 Added scale-to-zoom gesture support to the Gallery grid demo (#6185) 2016-10-03 16:08:15 -07:00
Chris Bracken
57d6cc4299 Use platform-specific back icon in Scaffold (#6182) 2016-10-03 15:34:15 -07:00
Adam Barth
8ec4f22941 Add landscape time picker (#6173)
Fixes #988
2016-10-03 12:00:49 -07:00
Dragoș Tiselice
42f773c327 Fixed DragTarget calling setState after dispose. (#6150)
DragTarget would call setState after it was disposed in didLeave
and didDrop. Fixes #6128.
2016-09-30 13:42:26 -07:00
Adam Barth
3b952d8456 Update engine (#6146) 2016-09-29 22:47:20 -07:00
Adam Barth
c9eda86b0e Switch to PointerData API (#6131)
Now dart:ui does the decoding of the pointer data itself, which means we don't
need to do it in the framework.
2016-09-29 21:25:20 -07:00
Adam Barth
2a530f78d4 Update engine.version (#6144) 2016-09-29 18:16:11 -07:00
Hans Muller
6a1ac731d8 PopupMenuButton menus inherit the button theme (#6132) 2016-09-29 15:34:12 -07:00
Adam Barth
a3b06f31da Switch date picker to using a custom Dialog
Rather than removing all the padding from an AlertDialog, we now just use
Dialog directly for the date picker.
2016-09-29 08:59:22 -07:00
Ian Hickson
e01592a0c0 Fix globalToLocal and update spinning_mixed (#6035)
* globalToLocal was just broken when there was a rotation and a
  translation at the same time. This fixes that and adds a test.

* update graphic used by spinning_mixed since the old one went 404.

* simplify some of the code in the demo.

* fix MatrixUtils.transformPoint to be consistent with how we transform
  points elsewhere.

* stop transforming points elsewhere, just use
  MatrixUtils.transformPoint.

* make the Widget binding handle not having a root element.

* make the spinning_mixed demo update its widget tree.
2016-09-28 01:06:32 -07:00
Adam Barth
23b4318e1a Revert "Roll the engine (#6099)"
This version of the engine crashes on startup.

This reverts commit a426b6b3c8df5cdd9c0105d8361ce3ce36864d60.
2016-09-27 16:12:16 -07:00
Adam Barth
dc4a1638ee Specialize AlertDialog and SimpleDialog (#6098)
We were trying to cram too much functionality in to the Dialog widget. Now we
have AlertDialog and SimpleDialog to cover to two different kinds of dialogs in
the spec.
2016-09-27 15:44:11 -07:00
Jason Simmons
a426b6b3c8 Roll the engine (#6099) 2016-09-27 13:01:57 -07:00
Adam Barth
0734edbeb0 Dialogs shouldn't scroll their headers or buttons (#6082)
Rather than scrolling the entire contents of the dialog, we should instead
scroll only the part between the title and the button bar.

Also, polish up the padding in the simple dialog demo.

Fixes #6057
2016-09-27 09:20:33 -07:00
Adam Barth
4c5084cbd2 Update clip geometry during hitTest if needed (#6091)
The code previously assumed that paint would be called before hitTest, but that
assumption isn't valid because RenderOpacity hit tests its children without
painting them.

Fixes #6089
2016-09-27 09:17:18 -07:00
Adam Barth
55f48f72c9 Persistent bottom sheet should not overlap app bar (#6076)
The spec forbids persistent bottom sheets from overlapping the app bar. There
are also some fancy scroll-linked effects that we're supposed to do with
persistent bottom sheets, but those will need to wait for another patch.

Fixes #5143
2016-09-26 14:02:01 -07:00
Adam Barth
8c048ec944 Polish SnackBar padding (#6071)
Previously, we were getting double padding: both inside and outside the button.
This patch moves all the padding inside the button so that the whole region is
hittable and the text is positioned correctly.

Fixes #6059
2016-09-26 12:01:23 -07:00
Ian Hickson
9e673853e5 Turn off AnimationControllers when not in use (#5902)
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.
2016-09-26 10:57:10 -07:00
Ian Hickson
78c74116a9 LayoutBuilder + GlobalKey + setState assert (#6068)
This silences an assertion that fired when reparenting a widget with a
global key inside a LayoutBuilder callback when that callback also
happened to call setState (directly or indirectly) on that widget.

Normally such setStates are considered ok since we know we haven't
cleaned that subtree yet, but we were not correctly handling the case
where the list needed resorting in that situation.
2016-09-26 10:27:53 -07:00
Adam Barth
c27b03b823 Add FittedBox (#6029)
This widget lets you apply an ImageFit to a child widget.

Fixes #5830
2016-09-23 17:40:16 -07:00
Ian Hickson
6a5e658131 Make sure to rebuild widgets even when they move (#5975)
Previously in some rather esoteric cases involving global keys reversing
relative positions we would forget to build everyone.
2016-09-22 14:44:57 -07:00
Dragoș Tiselice
3a6530d5a4 Added bottom navigation. (#5877) 2016-09-22 12:45:10 -07:00
Hans Muller
d3f540d4bd Fixed tabs fling velocity threshold (#5990) 2016-09-22 11:06:14 -07:00