5
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

【ちょっと便利な小技_part 3】Visual Studio Codeでflutter開発(More Actions編)

Last updated at Posted at 2023-08-22

More Actionsを使って開発時間を短縮

今回はMore Actions...について
下記画像のMore Actions...にある『Wrap with 〇〇』は
WidgetをWrapしてくれます。
方法はとても簡単なのでぜひやってみてください。
スクリーンショット 2023-08-17 16.19.57.png

Widget 効果
widget widgetでWrapしてくれる(基本的にWrapした後に任意のWidget書き換える)
Builder BuilderでWrapしてくれる
Center CenterでWrapしてくれる
Column ColumnでWrapしてくれる
Container ContainerでWrapしてくれる
Padding PaddingでWrapしてくれる
Row RowでWrapしてくれる
StreamBuilder StreamBuilderでWrapしてくれる

方法

WidgetでWrapしたいWidgetにカーソルを合わせて
『cmd』+『.』(Mac)
を選択します。
すると先ほどの画像のようになります。
最後にどのWidgetでWrapするか選択すればOK!
スクリーンショット 2023-08-17 16.19.46.png

結果

※例としてWrap with Centerを選択した時の結果を載せます。

SizedBoxをWrapした時↓
スクリーンショット 2023-08-17 16.49.52.png

TextをWrapした時↓
スクリーンショット 2023-08-17 16.51.50.png

5
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?