简体   繁体   中英

VSCode Dart/Flutter not rename import when rename the file

I'm coding Dart/Flutter in VSCode.

How to fix the problem where VSCode did not rename all import when I rename .dart file?

Is this the extensions bug or it's an unimplemented feature?

This is an unimplemented feature.

Originally the APIs in VS Code and the Dart analysis server were not compatible (VS Code would only tell us after the file was renamed, but the Dart server needed to know before the rename to create the correct edits).

This has recently changed - VS Code now has APIs that allow us to hook into the rename before it happens, but it hasn't been implemented in the Dart extension yet.

For notification when it is implemented, you can subscribe to this Dart-Code issue (otherwise, it'll be included in the release notes when it's done).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM