FormField is now a widget that can contain any type of field. Input no
longer has special code to handle form fields. Instead, there is a
helper widget InputFormField for using an Input inside a FormField.
Fixes https://github.com/flutter/flutter/issues/6097 and based on
feedback from the same.
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.