์ ์ฒด ๊ธ18 setState / ํจํค์ง ํ์ฉ ๊ณต๋ถํ ๋ด์ฉ ์ ๋ฆฌํด๋๊ฑฐ ์ ์ฅ ์ํ๊ณ ์ปดํจํฐ ์ฌ๋ถํ ํ๋๋ฐ ์์์ ์ฅ์ด ์๋์์ด์ ๐คฏ setState(() { leftDiceNumber = Random().nextInt(5) + 1; rightDiceNumber = Random().nextInt(5) + 1; } ์ ์คํ ์ดํธํ๋ฉด ํ๋ฉด ์๋กญ๊ฒ ๋น๋ ์งํ setState ๊ดํธ๊ฐ ํ๋ ๋ ์๋๋ฐ ์์งํ ์ ๊ดํธ๊ฐ ์ด๋์ ๋๋๋์ง ๋ชป์ฐพ์์.. ๋ฌธ๋ฒ์ธ๊ฑฐ ๊ฐ์๋ฐ ์ดํด๋ฅผ ์ ํํ ๋ชปํ๋ค์ https://pub.dev/flutter/packages ํ๋ฌํฐ ํจํค์ง ์ฌ์ฉ ๋ฐฉ๋ฒ ์ด ์ ๋๋ ์๊น๋จน์ง ์์๊น? dependencies ๋ฒ์ ์ ์ซ์ ๋ฐ๋๋ฉด ํจํค์ง ์ ์ฉ ์๋ ๊ฐ๋ฅ์ฑ โฌ๏ธ 2020. 4. 23. ๋ค์ด๋๋ฏน ํ์ (dynamic type system) ์ ๋ฆฌ ํ๋ฌํฐ๋ ๊ตฌ๊ธ์์ ๊ฐ๋ฐํ ํฌ๋ก์ค ํ๋ซํผ ๋ชจ๋ฐ์ผ ์ฑ ๊ฐ๋ฐ ํ๋ ์์ํฌ์ด๋ค. ์ธ์ด๋ ๊ตฌ๊ธ์ด ๊ฐ๋ฐํ Dart๋ฅผ ์ฌ์ฉํ๋ค. ํ์ฌ ์๋๋ก์ด๋์ iOS๋ฅผ ์ง์ํ๋ฉฐ ๊ตฌ๊ธ์ ์ฐจ๊ธฐ OS ํจ์์์ ๋ฉ์ธ ๊ฐ๋ฐํ๊ฒฝ์ด ๋๋ค๊ณ ํ๋ค. - ๋๋ฌด์ํค์์ ์ปท - ๐ก ๋๋ฅด๋ฉด Embed Widget Menu ๋ํ๋จ ALT + ENTER = Intention actions menu (like Padding, Center, widget, Column etc..) Expanded ์์ ฏ์ Row, Column, Flex ์ ๊ณต๊ฐ์ ์ฑ์ฐ๋ ์ญํ ์์ ฏ ์นดํ๋ก๊ทธ์์ ๋จธํ ๋ฆฌ์ผ ์ปดํฌ๋ํธ ์์ ฏ์ Buttons OnPressed : ( ){ } โฌ ๏ธ anonymous function = ์ด๋ฆ ์๋ ๋ช ๋ น์ด $ = String Interpolation ๋ฌธ์ฅ ์จ๋ฃ.. 2020. 4. 22. pubspec.yaml ํ๋ฌํฐ ํฐํธ ์ถ๊ฐ ํ๊ธฐ ์ด ๊ฐ์๋ ์ฑ๋ฆฐ์ง๊ฐ ๊ณ์ ๋ฑ์ฅํฉ๋๋ค ์ ๊นจ์ ์ข์์ ๐ ์๋๋ก์ด๋ ์คํ๋์ค์์ pubspec.yaml์ ํฐํธ ์ถ๊ฐํ๊ธฐ pubspec.yaml ์์ด๋ก ๋ค์๋ ํ์คํ ์ผ๋ฏ ํ์ผ ์ด๋ผ๊ณ ๋ค๋ฆฌ๋๋ฐ ์ ํํ ๋ฐ์์ด ๋ง๋๊ฑด์ง ๋ชจ๋ฅด๊ฒ ๋ค์; ์ ์ผ ์ค์ํ๊ฑฐ! ์์ ์ํด? ์์ผ๋ฉด pubspec.yaml์์ ์์ 2์นธ์ฉ ๋์ฐ๊ธฐ ์คํฌ๋ฆฐ์ท ์ด๋ฏธ์ง์ ํ์์ ์์ ๋ฒํธ fonts ํด๋ ๋ง๋ค์ด์ ํฐํธ ์ถ๊ฐ โก๏ธ pubspec.yaml ์ ํฐํธ ๋ด์ฉ ์ถ๊ฐ โก๏ธ ์ฐ์ธก ์๋จ ๊ตฌ์์ Pub get ์คํ โก๏ธ ์คํ ํ โก๏ธ Run every single indent is actually two spaces, and it's two spaces from the left, and it's two spaces. ์ด๊ฑฐ ๋ง์ด ๋ค์ด์ ์ธ๋๋ฉ๋๋ค ใ ์ธ์ .. 2020. 4. 22. Flutter Layouts Challenge Section 6: MiCard - How to Build Beautiful UIs with Flutter Widgets (์ฑ๋ฆฐ์ง ๊ณผ์ ) ๋ ์ด์์ ๋๊ฐ์ด ๋ง๋ค๊ธฐ ๋ณผ๋๋ ์ฌ์ ๋ณด์์ผ๋ ๊ฒฐ๊ตญ ์์ ๋๋ ค๋ณด๋ฉด์ ์คํ๋ถ์ผ๋ก ์งํ; 4~5๋ ์ ์๋ ์ด๋ฐ ๊ธฐ๋ฅ ์์ด์ ์๋ฎฌ๋ ์ดํฐ๋ก ์คํ ํ๋๋ฐ ์ค๋ ๊ธฐ๋ค๋ ธ๋๋ฐ Hot Reload & Hot Restart ์จ๋ณด๋ ์ด๋ง์ด๋ง ํ๋ค์ ์ ์ฅ๋ง ํ๋ฉด ๋ฐ๋ก๋ฐ๋ก ๋ฐ์๋์ ๋์์ธ์ด ์ง์ง ํธํด์ก๋ค์ ์์ ์ 1pt์ฉ ๋ง์ถ๋๊ฑฐ ์๊ฐํ๋ฉด ๐คฃ 2020. 4. 21. ์ด์ 1 2 3 4 5 ๋ค์