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.