Skip to content

Dart 3 class modifiers should be clearly visible in dartdocs #3392

Closed
@mit-mit

Description

@mit-mit

Dart 3 apps new class modifiers (dart-lang/language#2242), and the core libraries have been updated to many cases to use these. For example, the platform class in dart:io is now abstract final.

In the current DartDocs it's very hard to see these modifiers (e.g. platform). They are shown just textually near the top:

Screenshot 2023-04-21 at 13 39 37

I'd like to suggest the following improvements to make class modifiers more clear:

  1. Show capability chips after the class name (similar to the chips we show on API members in the rest of the page):

Screenshot 2023-04-21 at 13 43 58

  1. On generative constructors, show them as now available (e.g. using strikethrough text) with capability chips detailing why. From @lrhn the combinations where the constructor isn't available are: a) sealed, b) abstract final, and c) abstract interface).

Metadata

Metadata

Assignees

Labels

P2A bug or feature request we're likely to work onarea-web-designSomething a web designer interested in helping could do.type-enhancementA request for a change that isn't a bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions