Skip to content

Add a fix to create an extension method #55805

@bwilkerson

Description

@bwilkerson

Given a file containing the following (where c.dart contains the declaration of C):

import 'c.dart';

void f(C c) {
  var x = c.x;
  print(x);
}

It would be nice if the server offered a fix to create an extension method (getter). The extension could be added as an unnamed extension in the same file. If there's already an extension on the correct type it would be nice if the method were added to it rather than creating a new extension on the same type.

Metadata

Metadata

Assignees

Labels

P3A lower priority bug or feature requestdevexp-quick-fixIssues with analysis server (quick) fixeslegacy-area-analyzerUse area-devexp instead.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