flutter

ํ”Œ๋Ÿฌํ„ฐ์—์„œ๋Š” route๋ผ๋Š” ๊ฐœ๋…์œผ๋กœ ํŽ˜์ด์ง€ ์ด๋™์ด ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค. ์ด ๋•Œ ์ด๋™ํ•  ๊ณณ์„ page๋ผ๊ณ  ์ƒ๊ฐํ•ด์ฃผ๋ฉด ๋ฉ๋‹ˆ๋‹ค. ๊ตณ์ด ํŒŒ์ผ์„ ๋”ฐ๋กœ ๋‚˜๋ˆ„์ง€ ์•Š์•„๋„ ๊ฐ™์€ ํŒŒ์ผ ์•ˆ์—์„œ page๋งŒ ๋‚˜๋ˆ ์ฃผ๋ฉด ๋ฉ๋‹ˆ๋‹ค. ์ฐธ ์‰ฝ์ฃต? ๐Ÿ˜ ์ด๋™ ํ•  ๋•Œ ์“ฐ๋Š” ๊ฒƒ์œผ๋กœ๋Š” Navagator ๋ฉ”์„œ๋“œ๋ฅผ ์‚ฌ์šฉํ•˜์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค. main.dart Container( margin: EdgeInsets.only(top: 100, left: 0), width: 100, child: IconButton( icon: Text('Signup', style: TextStyle(fontSize: 20),), onPressed: (){ Navigator.push(context, MaterialPageRoute(builder: (context) => SignUpPage(..
๋ฐ˜๋ณต๋˜๋Š” ๋ถ€๋ถ„์„ ์†์ˆ˜ ์“ฐ์ง€ ์•Š๊ณ  ๋ฐ˜๋ณตํ•ด์„œ ๋งŒ๋“ค ์ˆ˜ ์žˆ๋‹ค. ์ด ๋•Œ ์“ธ ์ˆ˜ ์žˆ๋Š” ๊ฒƒ์ด ListView.builder ์ด๋‹ค. โ—พ Example ์ง€๊ธˆ๋ถ€ํ„ฐ ๋งŒ๋“ค์–ด ๋ณผ ๋ถ€๋ถ„์ธ๋ฐ ๋ณด๋ผ์ƒ‰์ด list_view๋ถ€๋ถ„์ด๊ณ  icons๊ฐ€ ํŒŒ๋ž€์ƒ‰๋ถ€๋ถ„์ด๋‹ค โ—พ Code list_view์— ๋ฐ˜๋ณต๋˜๋Š” ๋ถ€๋ถ„์„ ๋”ฐ๋กœ ํŒŒ์ผ(icons.dart)๋กœ ๋นผ์„œ ๋”ํ•˜๋Š”๊ฑฐ๋‹ค. list_view.dart Container( margin: EdgeInsets.only(top: 10, bottom: 20), child: Text('${descList[index]}'), ), Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( '${majorList[index]}', style: T..
ListView.builder์„ ์‚ฌ์šฉํ•ด์„œ ๊ตฌํ˜„ํ•˜๋‹ค๊ฐ€ ๋ณธ ๋งˆ์ฃผํ•œ ์—๋Ÿฌ์ด๋‹ค. ๋ฆฌ์ŠคํŠธ๋ฅผ 5๊ฐœ ์ •๋„๋ฅผ ๋งŒ๋“ค์–ด์„œ ๋ฐ˜๋ณต์‹œ์ผฐ๋Š”๋ฐ ์—๋ฎฌ๋ ˆ์ดํ„ฐ ํ™”๋ฉด์— ๋…ธ๋ž€ ๋ฐ”ํƒ•์— ์œ„์™€ ๊ฐ™์€ ์—๋Ÿฌ๊ฐ€ ๋œฌ๋‹ค. โ—พ ํ•ด๊ฒฐ๋ฐฉ์•ˆ @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text('์˜ˆ์ˆ ์ฒด์œกํ•™๊ณผ'), centerTitle: true, backgroundColor: Colors.white, elevation: 0, leading: IconButton( icon: Icon(Icons.arrow_back), color: Colors.grey, iconSize: 25.0, onPressed: () {}, ), actions: [ Container..
โ—พ ์™„์„ฑ ๋ชจ์Šต โ—พ code class Grade extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( backgroundColor: Colors.amber[800], appBar: AppBar( title: Text('BBANTO'), centerTitle: true, backgroundColor: Colors.amber[700], elevation: 0.0, //left side leading: IconButton( icon: Icon(Icons.menu), onPressed: () { print('menu button is clicked'); }, ), actions: [ IconButton( ..
1. Flutter์—์„œ ์œ„์ ฏ์ด๋ž€? UI๋ฅผ ๋งŒ๋“ค๊ณ  ๊ตฌ์„ฑํ•˜๋Š” ๋ชจ๋“  ๊ธฐ๋ณธ ๋‹จ์œ„ ์š”์†Œ๋ฅผ ์œ„์ ฏ์ด๋ผ๊ณ  ํ•ฉ๋‹ˆ๋‹ค. ๋ˆˆ์— ๋ณด์ด๋Š” ์š”์†Œ๋ฟ๋งŒ ์•„๋‹ˆ๋ผ ๋ณด์ด์ง€ ์•Š๋Š” ์š”์†Œ๋“ค๊นŒ์ง€๋„ ์œ„์ ฏ์ด๋ผ๊ณ  ํ•ฉ๋‹ˆ๋‹ค. ํ•œ๋งˆ๋””๋กœ Eveything is Widget. 2. ์œ„์ ฏ ํƒ€์ž… Stateless widget ์ƒํƒœ๊ฐ€ ์—†๋Š” ์ •์ ์ธ ์œ„์ ฏ์„ ๋œปํ•ฉ๋‹ˆ๋‹ค. ์Šคํฌ๋ฆฐ์ƒ์— ์กด์žฌ๋Š” ํ•˜์ง€๋งŒ ์•„๋ฌด๊ฒƒ๋„ ๊ฐ€์ง€์ง€ ์•Š๊ณ , ์‹ค์‹œ๊ฐ„ ๋ฐ์ดํ„ฐ ์ €์žฅ์„ ๋ชปํ•˜๋Š” ์œ„์ ฏ์ž…๋‹ˆ๋‹ค. ์–ด๋– ํ•œ ์ƒํƒฑ๋ฅผ ์œ ๋ฐœํ•˜๋Š” value ๊ฐ’๋„ ๊ฐ€์ง€์ง€ ์•Š๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด์„œ image, text Stateful widget ์–ด๋–ค ์ƒํƒœ๋ฅผ ๊ฐ€์ง€๊ณ  ๊ณ„์† ์›€์ง์ž„์ด๋‚˜ ๋ณ€ํ™”๊ฐ€ ์žˆ๋Š” ์œ„์ ฏ ์‚ฌ์šฉ์ž ์ธํ„ฐ๋ž™์…˜์— ๋”ฐ๋ผ์„œ ๋‹ฌ๋ผ์ง€๋Š” ์œ„์ ฏ์ž…๋‹ˆ๋‹ค. ์˜ˆ๋ฅผ ๋“ค๋ฉด input, checkbox 3. ์œ„์ ฏ ๊ตฌ์„ฑ(ํŠธ๋ฆฌ) ์œ„์˜ ์„ค๋ช…์ฒ˜๋Ÿผ ๋งŽ์€ ์š”์†Œ๋“ค์ด ์œ„..
๐Ÿ‘ฉ‍๐Ÿ’ป Today I Learned ๐Ÿ“š โ—พ Flutter vs React Native ์‚ฌ์ด๋“œ ํ”„๋กœ์ ํŠธ๋ฅผ ์œ„ํ•ด์„œ React Native์™€ TypeScript๋ฅผ ๊ฐ‘์ž‘์Šค๋Ÿฝ๊ฒŒ ๋ฐฐ์šฐ๊ธฐ ์‹œ์ž‘ํ–ˆ์—ˆ๋Š”๋ฐ, ํ”„๋กœ์ ํŠธ ํšŒ์˜๋ฅผ ๊ฑฐ๋“ญํ•˜๋‹ค๊ฐ€ ํ”„๋ก ํŠธ ์Šคํƒ ๋ณ€๊ฒฝ์— ๋Œ€ํ•œ ์ด์•ผ๊ธฐ๊ฐ€ ๋‚˜์™”๋‹ค. ํ•จ๊ป˜ ํ•˜๋Š” ํŒ€์› ์ค‘์— Flutter๋ฅผ ๋ฐฐ์šธ ์ผ์ด ์ƒ๊ฒจ์„œ ์ ‘ํ–ˆ๋Š”๋ฐ React Native ๋ณด๋‹ค ๋” ๊ดœ์ฐฎ์„์ง€๋„ ๋ชจ๋ฅธ๋‹ค๋Š” ์˜๊ฒฌ์ด ๋‚˜์™”๋‹ค. ๊ฐœ์ธ์ ์œผ๋กœ TypeScript๋ฅผ ๋ฐฐ์šฐ๊ณ  ์‹ถ์€ ๋งˆ์Œ์ด ์ปค์—ˆ๊ธฐ์— ๋ช‡ ๋ฒˆ ๋“ฃ๊ธด ํ–ˆ์ง€๋งŒ ์ž˜ ๋ชจ๋ฅด๋Š” Flutter์— ๋Œ€ํ•ด์„œ ๊ธ‰ํ•˜๊ฒŒ ์•Œ์•„๋ดค๋‹ค. ํฌ๋กœ์Šค ํ”Œ๋žซํผ ๋ชจ๋ฐ”์ผ ์•ฑ์„ ๊ตฌ์ถ•ํ•˜๊ณ  ์‹ถ๋‹ค๋ฉด ๋‹จ์—ฐ ๋– ์˜ค๋ฅด๋Š” ์„ ํƒ์ง€ ๋‘๊ฐœ๊ฐ€ ๋ฐ”๋กœ Flutter๋ž‘ React Native๋‹ค React Native์˜ ์ƒํƒœํ™˜๊ฒฝ์ด ๋” ํฌ๊ณ  ๋Œ€์ค‘์ ์˜€์ง€๋งŒ ์š”์ฆ˜์€ ์‹ฌ์‹ฌ์น˜..
๋ฐ(Ming) ๐Ÿฐ
'flutter' ํƒœ๊ทธ์˜ ๊ธ€ ๋ชฉ๋ก (2 Page)