Skip to content

Add a command to write recommended settings to the users User Settings for Dart #1302

Closed
@mit-mit

Description

@mit-mit

Start with the following code:

class CircularButton extends StatelessWidget {
  final Widget text;
  final VoidCallback onPressed;

  const CircularButton({this.text, this.onPressed});

  @override
  Widget build(BuildContext context) {
    return Center(
      child: RaisedButton(
        shape: CircleBorder(side: BorderSide(color: Colors.blue, width: 2)),
        child: text,
        onPressed: onPressed,
      ),
    );
  }
}

Next, place the cursor on RaisedButton
Invoke refactoring (option-enter).
Select 'Wrap with new widget'

=>

The code is oddly formatted; I would expect child: RaisedButton( to be indented two positions in from child: widget(, but it's 8 positions in.

Second, when I attempt to type a widget name, say SizedBox, in the widget placeholder text I get no code completion.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions