flutter / flutter/flutter-intellij

I don't want to include dynamic objects in find usages and rename

Open
#6,347 5 comments 1 reaction 0 assignees View on GitHub
Dominant language
Java
Stars
2k
Forks
356
Avg merge
1d 11h
Merged PRs (30d)
27

Description

In Windows, when I find usages (CTRL-ALT-F7) or rename (SHIFT-F6) it tries to find all instances, but it usually makes mistakes because it's trying to find untyped (dynamic) declarations. I understand some people may have use for dynamic typing, but in my experience almost no one uses it. My team certainly doesn't. When we have a large codebase, not only it takes a long time to find/rename, but it also risks making mistakes.

I could be wrong, but I'd guess having to deal with dynamic variables makes the find/rename process extremely slow, in comparison with Java, for example, which is almost instantaneous. I'd guess it also wastes a lot of memory. In Java I can also just trust rename refactors, but in Dart I only do when the name I am trying to change is very specific.

My request is a new setting:
* **Refactors should include dynamic variables**

Turning this off would disable finding and renaming dynamic variables.

Contributor guide

Open the contributing guide

Research direction

Start by tracing the find usages (CTRL-ALT-F7) and rename (SHIFT-F6) actions in the plugin to see where dynamic declarations are included. Determine how a setting could control both operations, then verify that disabling it excludes dynamic variables from find and rename results without changing typed references.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart
Domain
developer-experience, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.