mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
![]() Based on the [message format syntax](https://unicode-org.github.io/icu/userguide/format_parse/messages/#examples) for [ICU4J](https://unicode-org.github.io/icu-docs/apidoc/released/icu4j/com/ibm/icu/text/MessageFormat.html). This adds new syntax to the current Flutter messageFormat parser which should allow developers to add locale-specific date formatting. ## Usage example ``` "datetimeTest": "Today is {today, date, ::yMd}", "@datetimeTest": { "placeholders": { "today": { "description": "The date placeholder", "type": "DateTime" } } } ``` compiles to ``` String datetimeTest(DateTime today) { String _temp0 = intl.DateFormat.yMd(localeName).format(today); return 'Today is $_temp0'; } ``` Fixes https://github.com/flutter/flutter/issues/127304. |
||
---|---|---|
.. | ||
full_apps | ||
background_project.dart | ||
basic_project.dart | ||
compile_error_project.dart | ||
deferred_components_config.dart | ||
deferred_components_project.dart | ||
gen_l10n_project.dart | ||
hot_reload_const_project.dart | ||
hot_reload_project.dart | ||
hot_reload_with_asset.dart | ||
integration_tests_project.dart | ||
listen_for_sigterm.dart | ||
migrate_project.dart | ||
multidex_project.dart | ||
project_with_early_error.dart | ||
project.dart | ||
single_widget_reload_project.dart | ||
stateless_stateful_project.dart | ||
stepping_project.dart | ||
test_project.dart | ||
tests_project.dart |