Flutter

์ฐธ๊ณ ์‚ฌ์ดํŠธ โˆ™ ์ฝ”๋”ฉ์• ํ”Œ์˜ flutter-basic-layout-design ๋‚ด๊ฐ€ ์ข‹์•„ํ•˜๋Š” ๊ฐœ๋ฐœ์ž ์œ ํŠœ๋ฒ„ ๐Ÿœ Scaffold ์šฐ๋ฆฌ๊ฐ€ ์“ฐ๋Š” ์•ฑ์˜ ๋””์ž์ธ์€ ํฌ๊ฒŒ ์ƒ๋‹จ, ์ค‘๋‹จ, ํ•˜๋‹จ๋ถ€๋กœ ์ด๋ฃจ์–ด์ ธ์žˆ๋‹ค. ์ด๊ฑธ ์‰ฝ๊ฒŒ ๊ตฌ์„ฑํ•˜๊ณ  ์‹ถ์œผ๋ฉด Scaffold() ์œ„์ ฏ์„ ์‚ฌ์šฉํ•˜๋ฉด ๋œ๋‹ค. ๐Ÿ‘ท๐Ÿป ๊ตฌ์กฐ MaterialApp( home: Scaffold( appBar: // ์ƒ๋‹จ์— ๋„ฃ์„ ์œ„์ ฏ, body:// ์ค‘๋‹จ์— ๋„ฃ์„ ์œ„์ ฏ, bottomNavigationBar:// ํ•˜๋‹จ์— ๋„ฃ์„ ์œ„์ ฏ, ) ); Scaffold() ์œ„์ ฏ์€ 3๊ฐœ์˜ ํŒŒ๋ผ๋ฏธํ„ฐ(appBar, body, bottomNavigationBar)๋ฅผ ํ†ตํ•ด ์ƒ/์ค‘/ํ•˜๋กœ ๋‚˜๋‰˜๊ฒŒ ํ•ด์ค€๋‹ค. appBar(์ƒ๋‹จ), bottomNavigationBar(ํ•˜๋‹จ)์€ ํ•„์ˆ˜๊ฐ€ ์•„๋‹ˆ๊ณ  body(์ค‘๋‹จ)์€ ํ•„์ˆ˜..
์ฐธ๊ณ ์‚ฌ์ดํŠธ โˆ™ deku๋‹˜์˜ ํฌ์ŠคํŠธ๋ฆฌ ๐Ÿ”ฉ Widget Flutter๋Š” ํ™”๋ฉด์€ ์œ„์ ฏ์—์„œ ์‹œ์ž‘ํ•ด์„œ ์œ„์ ฏ์œผ๋กœ ๋๋‚œ๋‹ค. widget์ด๋ž€ Flutter์—์„œ ํ™”๋ฉด์— ํ‘œ์‹œ๋œ ๋ชจ๋“  ์š”์†Œ๊ฐ€ ์œ„์ ฏ์ด๋ฉฐ, ๋ˆˆ์— ๋ณด์ด์ง€ ์•Š์ง€๋งŒ ํ™”๋ฉด์„ ๊ตฌ์„ฑํ•˜๋Š” ๋ ˆ์ด์•„์›ƒ(Layout) ๋˜ํ•œ ์œ„์ ฏ์ด๋‹ค. ํ”Œ๋Ÿฌํ„ฐ์˜ ์œ„์ ฏ์€ ํฌ๊ฒŒ 2๊ฐ€์ง€๊ฐ€ ์กด์žฌํ•œ๋‹ค. ๐Ÿ˜ถ Stateless Widget ๊ฐ’์€ ๊ฐ€์ง€๊ณ  ์žˆ์„ ์ˆ˜ ์žˆ์œผ๋‚˜ ์–ด๋– ํ•œ ๋™์ž‘์„ ํ•˜๋”๋ผ๋„ ๋ณ€ํ•˜์ง€ ์•Š๋Š” ์œ„์ ฏ์„ ๋‚˜ํƒ€๋‚ธ๋‹ค. ํ•ด๋‹น ์œ„์ ฏ์€ Flutter์— StatelessWidget์„ ์ƒ์†๋ฐ›์•„ ์ƒ์„ฑํ•œ๋‹ค. ๐Ÿซจ Stateful Widget ์–ด๋– ํ•œ ์ƒํƒœ๊ฐ’(๋ฐ์ดํ„ฐ)์„ ๊ฐ€์ง€๊ณ  ์žˆ๋‹ค๊ฐ€ ํ•ด๋‹น ์ƒํƒœ๊ฐ’์ด ๋ณ€๊ฒฝ๋˜๋ฉด ๋ณ€๊ฒฝ์‚ฌํ•ญ์„ ์ธ์ง€ํ•˜๊ณ  ํ•ด๋‹น ์œ„์ ฏ์„ ๋‹ค์‹œ ๊ทธ๋ ค์ค€๋‹ค. (๋ฆฌ-๋ Œ๋”๋ง) ex. TextField, Button, ์„œ๋ฒ„๋กœ๋ถ€ํ„ฐ ์ „๋‹ฌ๋ฐ›์€ ..
๐Ÿ› ๏ธ Flutter Flutter๋Š” Google์—์„œ ๊ฐœ๋ฐœํ•˜๊ณ  ์ง€์›ํ•˜๋Š” ์˜คํ”ˆ ์†Œ์Šค ๋ชจ๋ฐ”์ผ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ๊ฐœ๋ฐœ ํ”„๋ ˆ์ž„์›Œํฌ์ž…๋‹ˆ๋‹ค. ์ด ์„น์…˜์—์„œ๋Š” Flutter ๊ฐœ๋ฐœํ™˜๊ฒฝ ์„ค์ •์— ๋Œ€ํ•ด ์„ค๋ช…ํ•ฉ๋‹ˆ๋‹ค. ๐Ÿบ Homebrew ์„ค์น˜ Homebrew๋Š” macOS์˜ ํŒจํ‚ค์ง€ ๊ด€๋ฆฌ์ž์ž…๋‹ˆ๋‹ค. ํ•ด๋‹น ํŒจํ‚ค์ง€ ๊ด€๋ฆฌ์ž๋ฅผ Terminal์—์„œ ๋ช…๋ น์–ด๋ฅผ ์ด์šฉํ•˜์—ฌ ํŒจํ‚ค์ง€๋ฅผ ์„ค์น˜ํ•˜๊ณ , ๋Œ€๋ถ€๋ถ„ ๋ณ„๋„์˜ Path ์„ค์ • ์—†์ด ํ™˜๊ฒฝ๋ณ€์ˆ˜ ์„ค์ •์„ ๋„์™€์ค๋‹ˆ๋‹ค. ๐Ÿ”ง Dart ์„ค์น˜ Dart๋Š” Flutter์— ์‚ฌ์šฉ๋˜๋Š” ๊ฐœ๋ฐœ ์–ธ์–ด์ž…๋‹ˆ๋‹ค. # Dart์˜ ์„ค์น˜ ์—ฌ๋ถ€๋ฅผ ํ™•์ธํ•ฉ๋‹ˆ๋‹ค. $ brew -v # ์„ค์น˜ ์•ˆ ๋˜์–ด ์žˆ์„ ์‹œ, $ brew install dart ๐Ÿ”จ Xcode ์„ค์น˜ App Store์—์„œ Xcode๋ฅผ ์„ค์น˜ํ•˜์—ฌ ์—๋ฎฌ๋ ˆ์ดํ„ฐ์— ์‚ฌ์šฉ๋  ์†Œํ”„ํŠธ์›จ์–ด๋ฅผ ์„ค์น˜ํ•ฉ๋‹ˆ๋‹ค. ํ•ด๋‹น ๊ธฐ..
ma.caron_g
'Flutter' ํƒœ๊ทธ์˜ ๊ธ€ ๋ชฉ๋ก