Skip to content

Add context menu option to "comment out widget" #2338

Open
@matthew-carroll

Description

@matthew-carroll

When I'm hacking or prototyping with Flutter I occasionally want to comment out one or a few Widgets within a Widget tree. This allows me to verify that certain effects are happening the way that I think they are by temporarily commenting out unrelated Widgets.

Example:

Start with:

new Widget1(
  child: new Widget2(
    child: new Widget3(
      // params
    ),
  ),
);

Comment out the 2nd widget:

new Widget1(
  //child: new Widget2(
    child: new Widget3(
      // params
    ),
  //),
);

I'd like a context menu option that allows me to comment out one or more Widgets in the middle of a tree. This can't be accomplished with the traditional "CMD+/" because the closing braces won't be commented out and then it becomes very difficult to find the corresponding braces.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions