Why I cannot (?) move a method from one Dart file to another using Android Studio and Flutter Plugin? My file is getting big and I decided to refactor it by separated some Widget build methods to their own files. I started by selecting one of the methods, performing the Android Studio's refactor command and click move as I always did with java. But looks like the only option is to move the actual Dart File to another Directory.

It would be nice if I could move the method and the entire tree to another file, and some others refactoring options.

Is there any way to facilitate this type of refactoring?

enter image description here

enter image description here

Android Studio 3.3 RC 2 Build #AI-182.5107.16.33.5160847, built on December 3, 2018 JRE: 1.8.0_152-release-1248-b01 amd64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Linux 4.15.0-39-generic


Solution 1: Adam

This is a open feature request of the dart sdk. Unfortunately, for more than two years it did not find much attention. https://github.com/dart-lang/sdk/issues/30310