Skip to content

Provide an API to detect if a TextPosition is located at a soft word wrap #113228

@Renzo-Olivares

Description

@Renzo-Olivares

Currently it is not possible to detect if a TextPosition is located at a soft word wrap. We should provide an API, most likely through RenderEditable that gives this information. This is necessary to accomplish the use case below.

Use case

On iOS we want to be able to toggle the toolbar if we tap on the same TextPosition regardless of the TextAffinity when our tap is not at a soft word wrap. When our tap is at a soft word wrap we want to hide the toolbar if the TextAffinity has changed and toggle the toolbar if it hasn't.

Proposal

Provide an API through RenderEditable that tells us if a given TextPosition is located at a word wrap.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projecta: text inputEntering text in a text field or keyboard related problemsc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterframeworkflutter/packages/flutter repository. See also f: labels.platform-iosiOS applications specificallyteam-designOwned by Design Languages teamtriaged-designTriaged by Design Languages team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions