Search

Flutter on VS CODE

Flutter on VS CODE

1.
VS CODE
2.
Extension (ํ™•์žฅ)
3.
Flutter ๊ฒ€์ƒ‰
4.
Inatall [์„ค์น˜]

์ฃผ์š” ๋ช…๋ น์–ด

flutter: New Project

flutter: Select Device

flutter ๋””๋ฒ„๊ทธ : F5

flutter ์‹คํ–‰ : ctrl + F5

Snippets

stless, stful ๋“ฑ ์ฝ”๋“œ ์Šค๋‹ˆํŽซ์„ ์ž‘์„ฑํ•˜๋ฉด, ๋น ๋ฅด๊ฒŒ ์ฝ”๋“œ๋ฅผ ์ž๋™ ์™„์„ฑํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
โ€ข
stless
import 'package:flutter/material.dart'; class MyWidget extends StatelessWidget { Widget build(BuildContext context) { return Container( // Stateless Widget์˜ ๋‚ด์šฉ์„ ์—ฌ๊ธฐ์— ์ž‘์„ฑํ•ฉ๋‹ˆ๋‹ค. ); } }
Dart
๋ณต์‚ฌ
โ€ข
stful
import 'package:flutter/material.dart'; class MyWidget extends StatefulWidget { _MyWidgetState createState() => _MyWidgetState(); } class _MyWidgetState extends State<MyWidget> { Widget build(BuildContext context) { return Container( // StatefulWidget์˜ ๋‚ด์šฉ์„ ์—ฌ๊ธฐ์— ์ž‘์„ฑํ•ฉ๋‹ˆ๋‹ค. ); } }
Dart
๋ณต์‚ฌ

์ถ”๊ฐ€ ํ™•์žฅ ์„ค์น˜

Flutter Tree

HTML ์˜ Emmet ๊ณผ ์œ ์‚ฌํ•˜๊ฒŒ ( > , [] ) ๊ธฐํ˜ธ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ํ”Œ๋Ÿฌํ„ฐ ์œ„์ ฏ์˜ child, chlidren ์œ„์ ฏ์„ ๋น ๋ฅด๊ฒŒ ์ž‘์„ฑํ•  ์ˆ˜ ์žˆ๊ฒŒ ๋„์™€์ฃผ๋Š” ํ™•์žฅ๋„๊ตฌ

์˜ˆ์‹œ

OneChild>MultipleChild[OneChild,MultipleChild[OneChild,OneChild],OneChild>OneChild]
Dart
๋ณต์‚ฌ
OneChild( child: MultipleChild( children: <Widget>[ OneChild(), MultipleChild( children: <Widget>[ OneChild(), OneChild(), ] ), OneChild( child: OneChild(), ), ] ), ),
Dart
๋ณต์‚ฌ