Skip to content

Extensions on nullable class are missing from generated docs #3907

@loic-sharma

Description

@loic-sharma

Summary

If an extension is on T?, dart doc will not include it on T’s API reference. Follow-up to #2021

Repro

See: https://github.com/loic-sharma/static_extension_on_nullable

Create a library with an extension methods on Widget and Widget?:

class Widget {}

extension NullableDecorators on Widget? {
  Widget padding() => Widget();
}

extension Decorators on Widget {
  Widget expanded() => Widget();
}

Expected result

dart doc includes both the .padding and .expanded extension methods on the Widget class.

Actual result

The .padding extension method is missing:

image

Metadata

Metadata

Assignees

Labels

P3A lower priority bug or feature requesttype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions