Flutter-intellij: Swap out existing code in new widget

Created on 26 Jun 2018  路  5Comments  路  Source: flutter/flutter-intellij

The refactoring assistant provided by the plugin should be extended by the functionality to move existing code into a new widget in a new file. This would speed up the refactoring process immensely, by removing the need to write the boiler plate code and copy the existing functionality.

enhancement topic-editing

Most helpful comment

We used to have a Quick Assist to extract a class into a new library (i.e. a new file) and import it into the source library. It was removed since then, I plan to restore it to solve this issue. It seems to me that separating extracting widgets into a class, and extracting a class into a file might be better. BTW, in the same way we always extract a StatelessWidget, and don't have an option to extract StatefulWidget - there is a separate Quick Assist to convert into StatefulWidget. This helps to prevent combinatorial explosion of variants.

All 5 comments

/cc @scheglov

We used to have a Quick Assist to extract a class into a new library (i.e. a new file) and import it into the source library. It was removed since then, I plan to restore it to solve this issue. It seems to me that separating extracting widgets into a class, and extracting a class into a file might be better. BTW, in the same way we always extract a StatelessWidget, and don't have an option to extract StatefulWidget - there is a separate Quick Assist to convert into StatefulWidget. This helps to prevent combinatorial explosion of variants.

I'm with this.

Any news about this?

I agree with this. It would be a great feature.

Was this page helpful?
0 / 5 - 0 ratings