flutter / flutter/flutter-intellij
Annotation Color Scheme Inconsistency
- Dominant language
- Java
- Stars
- 2k
- Forks
- 356
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 27
Description
In **IntelliJ → Settings → Editor → Color Scheme → Dart**, the *Annotation* color setting is only applied to **const annotations** (e.g. `@freezed`), but not to **class-based annotations** (e.g. `@Freezed()`).
#### Current Behavior
* `@freezed`
* Highlighted using the `Metadata` color (as expected for annotations).
* `@Freezed()`
* `Freezed` is highlighted as a regular class name.
* Inherits color from `Classes → Class name` instead of the Annotation/Metadata color.
This results in inconsistent highlighting between const and class-based annotations.
#### Expected Behavior
Both forms of annotations:
```dart
@freezed
@Freezed()
```
should use the same **Annotation/Metadata** color setting in the Dart color scheme.
#### Why This Matters
Class-based annotations are very common in Dart (e.g. `@Freezed()`, `@JsonSerializable()`, etc.). Treating them as regular classes instead of annotations makes it harder to visually distinguish annotations from other class usages and reduces consistency in syntax highlighting.
Contributor guide
Research direction
The issue names no implementation files or tests. Start by locating the Dart syntax-highlighting and color-scheme handling for metadata and annotation references, then compare const annotations with class-based annotations such as @Freezed(). Done means both forms use the Annotation/Metadata color setting, with regression coverage for each form.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, java
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 40/100