Skip to content

Incorrect character count in TextField for extended grapheme clustersΒ #54240

@justinmc

Description

@justinmc

The character count is wrong when a complex emoji such as πŸ‘¨β€πŸ‘©β€πŸ‘¦ is used in a TextField.

TextField(
  maxLength: 10,
),

screenshot

This is due to Flutter counting runes instead of graphemes. Read more about this problem in my solution proposal: https://docs.google.com/a/google.com/document/d/1OOFW0PEZf0orBl445YXJ3nfjyKOqZdmeQ6KU3glUh7s/edit?usp=sharing.

Metadata

Metadata

Assignees

Labels

a: text inputEntering text in a text field or keyboard related problemsf: material designflutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions