Skip to content

Expose the characters package to Flutter users for better unicode handling #55593

@InMatrix

Description

@InMatrix

Use case

The characters package was recently introduced to address Dart String's limitations of manipulating extended grapheme clusters (dart-lang/language#34). However, it requires the user to get out of their way to look for it and add it to their Flutter projects. This barrier is likely to cause continued use of the String API in cases where the characters package ought to be used to avoid breaking emojis and non-English text.

Proposal

As part of a larger plan to make characters more readily available to writers of text manipulation code, the Flutter framework can export the characters package once it has integrated it into its internal implementation as described in the TextField Characters Proposal. The user-observable effect is that the extension characters will become visible when the user does an autocomplete on a String object in their Flutter project.

Alternatively, the Flutter starter app template can always import the characters package. The downside is that the package will only be made available within main.dart unless the user imports it in other files of their project.

Cc: @justinmc

Metadata

Metadata

Assignees

Labels

frameworkflutter/packages/flutter repository. See also f: labels.from: studyReported in a UX study

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions