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
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.
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
* 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.
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.
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
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
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
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
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.
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.