You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently, when using records with named fields, the names of the fields are not highlighted like regular field accessors.
Describe the solution you'd like
Have named fields of records highlighted the same way as fields / local variables.
Since named fields in methods and constructors get highlighted in blue, I propose we do the following:
Highlight the named fields of records at the declaration site (LHS of the code sample).
This brings it in line with named fields for methods/constructors.
Highlight the named field access when using the field.
This brings it in line with regular usage of class fields and (local) variables.
Describe alternatives you've considered
N/A
Additional context
Dart-Code v3.78.2
Flutter (Channel stable, 3.16.0, on Microsoft Windows [Version 10.0.19045.3803], locale nl-BE)
• Flutter version 3.16.0 on channel stable at E:\Documenten\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision db7ef5bf9f (5 weeks ago), 2023-11-15 11:25:44 -0800
• Engine revision 74d16627b9
• Dart version 3.2.0
• DevTools version 2.28.2
Fixed by dart-lang/sdk@0d6dd73. The change ships inside the Dart/Flutter SDKs, so it'll show up in a future SDK release (not a Dart-Code extension release).
Activity
[-][Proposal] Adjust the highlights for record named fields[/-][+]Record fields are not syntax highlighted[/+][analysis_server] Add syntax highlighting to record fields
DanTup commentedon Jan 10, 2024
Fixed by dart-lang/sdk@0d6dd73. The change ships inside the Dart/Flutter SDKs, so it'll show up in a future SDK release (not a Dart-Code extension release).
Thanks!