mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
New feature in upcoming Dart 3.2. See https://github.com/dart-lang/language/issues/2020. Feature is enabled by bumping the min SDK version to 3.2. Part of https://github.com/flutter/flutter/issues/134476.
Usage
To generate code for line/word break properties, follow these steps:
1. Download the unicode files:
The properties files can be found on the unicode.org website, for example LineBreak.txt and WordBreakProperty.txt. The codegen script expects the files to be located at third_party/web_unicode/properties/.
2. Run the codegen script:
Inside the third_party/web_unicode directory:
dart tool/unicode_sync_script.dart
Check Mode
If you don't want to generate code, but you want to make sure that the properties files and the codegen files are still in sync, you can run the codegen script in "check mode".
Inside the third_party/web_unicode directory:
dart tool/unicode_sync_script.dart --check
This command won't overwite the existing codegen files. It only checks whether they are still in sync with the properties files or not. If not, it exits with a non-zero exit code.