-
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 listc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterf: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.frameworkflutter/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-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages 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
Using the new material 3 SearchBar, it would be nice to be able to pass in the TextCapitalization to use in the TextField.
For example, if I have a SearchBar where the user can search a list of things, or create one if it doesn't exist in the list, sometimes I want those new things to begin with a capital letter as default without the user having to manually use shift to capitalize the first letter. Currently this is not possible.
Proposal
Currently this is what happens by default when you type into SearchBar without manually using shift to capitalize the first letter:
To allow this to default to "New thing", it's a really easy addition: allow passing in a TextCapitalization property:
SearchBar(
hintText: "Search or create",
onChanged: widget.onChanged,
textCapitalization: TextCapitalization.sentences,
)
And apply this to the TextField in SearchBar:
TextField(
...
// ADD THIS:
textCapitalization: widget.textCapitalization,
)
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterf: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.frameworkflutter/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-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team
