-
Notifications
You must be signed in to change notification settings - Fork 327
Remove a widget from hierarchy #1283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
When you are removing a widget are you also removing its children? Or are you asking for a feature that will promote some child to be the replacement for its parent? The first case can easily be done using Edit>Extend Selection, but I can see that the second case involves more tricky editing. |
Thanks for all the hard work and listening to this request! I find myself wishing for this feature more and more... In my case, I'd love Option #2: to be able to "Unwrap" the child Widget / promote it to replace the parent. As you mention, Option #1 seems to be covered by core editor functionality. ExampleStart with something like this: return new Card(
child: new Container(
color: Colors.red,
padding: new EdgeInsets.only(
top: 12.0,
bottom: 12.0,
),
child: new Image.network(
thumbnailUrl,
scale: 1.0,
fit: BoxFit.cover,
),
),
); In my case, I want to remove the return new Card(
child: new Image.network(
thumbnailUrl,
scale: 1.0,
fit: BoxFit.cover,
),
); And if we want to get crazy, remove the return new Image.network(
thumbnailUrl,
scale: 1.0,
fit: BoxFit.cover,
); I could see this working a couple of ways:
|
/cc @stevemessick - some feedback about a potential 'Move up' Flutter refactoring. |
…children'. [email protected], [email protected] Bug: flutter/flutter-intellij#1283 Change-Id: Ic50de9739cdab5cd82649dcbd8370c5e728d2ee3 flutter/flutter-intellij#1756 Reviewed-on: https://dart-review.googlesource.com/40240 Reviewed-by: Brian Wilkerson <[email protected]> Reviewed-by: Devon Carew <[email protected]>
Cool! Can't wait to give this a try! 🎉 |
I absolutely love the "wrap with new widget" feature. It's great!
I wish there'd also be the opposite of that, i.e. removing a widget from the hierarchy.
The text was updated successfully, but these errors were encountered: