This patch moves RawKeyboard from mojom over to platform messages. In
the process, I've also cleaned up the interface substantially.
Currently raw key events are supported only on Android, but the
interfaces defined in this patch should scale up to multiple platforms.
Add an option to provide a custom description to predicate
finders. Without a custom description we default to printing the
predicate function's signature, which is not all that useful.
Use this new option in the driver extension to print the text of the
sought after tooltip.
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
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
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
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
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
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
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
* 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
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