Update package:intl4x to 1.0.0-alpha.1 for Dart#556
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the Dart SDK environment constraint to ^3.12.0 and upgrades several dependencies in pubspec.yaml and pubspec.lock. It also attempts to change how dateStyle and timeStyle are added to the options map in datetime_format.dart. However, the introduced syntax 'dateStyle': ?dateStyle is invalid in Dart and will cause a compilation error. It is recommended to revert to the original collection-if syntax (if (dateStyle != null)) to conditionally include these keys.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| 'dateStyle': ?dateStyle, | ||
| 'timeStyle': ?timeStyle, |
There was a problem hiding this comment.
The syntax 'dateStyle': ?dateStyle is invalid in Dart and will cause a compilation error. Dart does not support the ? prefix operator for map values or entries. If you want to conditionally include these keys only when they are non-null (consistent with yearStyle and calendar below), you should use the if (variable != null) collection-if syntax. If you want to always include the keys (even with null values), simply use dateStyle and timeStyle without the ? prefix.
| 'dateStyle': ?dateStyle, | |
| 'timeStyle': ?timeStyle, | |
| if (dateStyle != null) 'dateStyle': dateStyle, | |
| if (timeStyle != null) 'timeStyle': timeStyle, |
No description provided.