Skip to content

Update package:intl4x to 1.0.0-alpha.1 for Dart#556

Draft
mosuem wants to merge 2 commits into
mainfrom
updateDartv1
Draft

Update package:intl4x to 1.0.0-alpha.1 for Dart#556
mosuem wants to merge 2 commits into
mainfrom
updateDartv1

Conversation

@mosuem

@mosuem mosuem commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +140 to +141
'dateStyle': ?dateStyle,
'timeStyle': ?timeStyle,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

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.

Suggested change
'dateStyle': ?dateStyle,
'timeStyle': ?timeStyle,
if (dateStyle != null) 'dateStyle': dateStyle,
if (timeStyle != null) 'timeStyle': timeStyle,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant