Skip to content

"Move class to file" ask to export new file from source #56692

Open
@FMorschel

Description

@FMorschel

If you have the following project:

In main.dart:

class A {}

class C extends A {}

In other.dart:

import 'main.dart';

void f(C c) {}

And you use "Move class to file" on C, the current output for other.dart is (#56658 for the unused_import):

import 'main.dart';
import 'c.dart';

void f(C c) {}

I'm not sure how this could be done, but I'd like to ask for a way for me to say if I want to add export 'c.dart'; inside main.dart so that other files don't need to change.


// CC: @DanTup

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2A bug or feature request we're likely to work onarea-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-refactoringIssues with analysis server refactoringstype-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