-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemsc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.r: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-frameworkOwned by Framework teamOwned by Framework teamtriaged-frameworkTriaged by Framework teamTriaged by Framework team
Description
Is there an existing issue for this?
- I have searched the existing issues
- I have read the guide to filing a bug
Use case
Widgets that open a TextInputConnection might receive a TextInputConfiguration to forward it to TextInput.attach.
For those kinds of widgets, it's expected that they will detach and re-attach to the IME when the TextInputConfiguration changes during didUpdateWidget. For example:
@override
void didUpdateWidget(Widget oldWidget) {
super.didUpdateWidget(oldWidget);
if (widget.imeConfiguration != oldWidget.imeConfiguration) {
// close input connection.
// open new input connection.
}
}Consider this widget being used in the following example:
MyWidget(
imeConfiguration: TextInputConfiguration(
textCapitalization: TextCapitalization.characters,
),
)In this example, each time the widget rebuilds, it closes and re-opens the IME connection, because we will have different TextInputConfiguration instances and, by checkingwidget.imeConfiguration != oldWidget.imeConfiguration, we are comparing only the references.
Proposal
Implement the == operator for both TextInputConfiguration and AutofillConfiguration, so two instances with the same values are considered to be equal.
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemsc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.r: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-frameworkOwned by Framework teamOwned by Framework teamtriaged-frameworkTriaged by Framework teamTriaged by Framework team