Skip to content

Cannot resolve top-level methods with docimports #56088

@goderbauer

Description

@goderbauer

I am trying to get this [runApp] reference to resolve with docimports:

https://github.com/flutter/flutter/blob/1d1367678a56ce5d3e02175456ee29f50363da83/packages/flutter/lib/src/foundation/binding.dart#L431

I added the following doc import for the widget library (which exports runApp from https://github.com/flutter/flutter/blob/1d1367678a56ce5d3e02175456ee29f50363da83/packages/flutter/lib/src/widgets/binding.dart#L1397):

/// @docImport 'package:flutter/widgets.dart';
library;

It doesn't work, though. The comment_references lint continues to complain about the [runApp] reference and clicking through in the IDE on [runApp] also results in a "Cannot find declaration to go to" error.

Metadata

Metadata

Assignees

Labels

P2A bug or feature request we're likely to work onlegacy-area-analyzerUse area-devexp instead.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions