์ „์ฒด ๊ธ€

Hello World
๋‚˜๋Š” ์•„๋ฌด ์ƒ๊ฐ์—†์ด ์ฝ”๋”ฉํ• ๋•Œ ์ฃผ๋กœ asset์„ ์ด์šฉํ•˜์—ฌ ์ด๋ฏธ์ง€๋ฅผ ๋ถˆ๋Ÿฌ์˜ค๊ณค ํ•œ๋‹ค. ๊ทธ๋Ÿด๋•Œ ์ฝ”๋“œ๋ฅผ ๋ณด๋ฉด ์œ„์™€ ๊ฐ™์€ ์‹์œผ๋กœ ์ˆซ์ž๋งŒ ๋ฐ”๋€Œ๊ณ  ๋˜‘๊ฐ™์€ ์ฝ”๋“œ๋ฅผ ์ค‘๋ณตํ•ด์„œ ์‚ฌ์šฉํ•˜๊ฒŒ ๋˜๋Š”๋ฐ ์œ„ ์ฝ”๋“œ์™€ ๊ฐ™์ด Mapํ•จ์ˆ˜๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ๋งค์šฐ ๊น”๋”ํ•˜๊ฒŒ ์ฝ”๋“œ๋ฅผ ์ •๋ ฌํ•  ์ˆ˜ ์žˆ๋‹ค. ๋‹ค๋งŒ ์ฃผ์˜ํ•ด์•ผํ•  ์ ์œผ๋กœ๋Š” ๋ฐ˜๋“œ์‹œ ํƒ€์ž…์„ .toList()๋กœ ๋งŒ๋“ค์–ด์ฃผ์–ด์•ผ ํ•œ๋‹ค. ๊ทธ ์ด์œ ๋กœ๋Š” children์˜ ๋ฐ˜ํ™˜ํƒ€์ž…์€ List์ด๋‹ค. Map์€ Iterableํƒ€์ž…์ด๋ฏ€๋กœ .toList()๋ฅผ ํ†ตํ•ด Listํ˜•์‹์œผ๋กœ ๋ฐ”๊พธ์–ด ์ฃผ์–ด์•ผ๋งŒ ์—๋Ÿฌ์—†์ด ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋‹ค.
๋‚˜๋Š” ํ”Œ๋Ÿฌํ„ฐ๋ฅผ ๋ฐฐ์šธ๋•Œ Navigator.of(context).push()๋ฅผ ํ†ตํ•ด ๋‹จ์ˆœ ํŽ˜์ด์ง€ ์ „ํ™˜๋งŒ ๋˜๋Š”์ค„ ์•Œ์•˜๋‹ค. ํ•˜์ง€๋งŒ ๊ณต์‹๋ฌธ์„œ๋ฅผ ๋ณด๋˜์ค‘ PageRouteBuilder๋ฅผ ํ†ตํ•ด ์ „ํ™˜์„ ์ข€๋” ๋…ํŠนํ•˜๊ฒŒ ํ•  ์ˆ˜ ์žˆ๋‹ค๋Š”๊ฒƒ์„ ์•Œ์•˜๋‹ค. ์‚ฌ์šฉ๋ฒ•์€ ๋งค์šฐ ๊ฐ„๋‹จํ•˜๋‹ค. Route _createRoute() { return PageRouteBuilder( pageBuilder: (context, animation, secondaryAnimation) => const Page2(), transitionsBuilder: (context, animation, secondaryAnimation, child) { const begin = Offset(0.0, 1.0); const end = Offset.zero; final twee..
์ œ์Šค์ฒ˜๋ฅผ ๊ฐ์ง€ํ•˜๋Š” ์œ„์ ฏ์ž…๋‹ˆ๋‹ค. NULL์ด ์•„๋‹Œ ์ฝœ๋ฐฑ์— ํ•ด๋‹นํ•˜๋Š” ์ œ์Šค์ฒ˜๋ฅผ ์ธ์‹ํ•ฉ๋‹ˆ๋‹ค. ์ด ์œ„์ ฏ์— ์ž์‹์ด ์žˆ์œผ๋ฉด ํฌ๊ธฐ๋Š” ํ•ด๋‹น ์ž์‹์„ ๋”ฐ๋ฅด๊ณ  ๋งŒ์•ฝ ์ž์‹์ด ์—†์„๊ฒฝ์šฐ ๋ถ€๋ชจ์— ๋งž์ถฐ์„œ ํฌ๊ธฐ๊ฐ€ ์กฐ์ •๋ฉ๋‹ˆ๋‹ค. https://api.flutter.dev/flutter/widgets/GestureDetector-class.html ์‚ฌ์šฉ๋ฒ•์€ ๊ฐ„๋‹จํ•ฉ๋‹ˆ๋‹ค. ์‚ฌ์šฉํ•˜๋ ค๋Š” Gesture ์†์„ฑ์„ ์„ ํƒํ•˜๊ณ  ์–ด๋–ค ๋™์ž‘์„ ํ• ์ง€ ์„ ์–ธํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค. import 'package:flutter/material.dart'; void main() => runApp( MaterialApp( home: HomeScreen(), ), ); class HomeScreen extends StatefulWidget { const HomeScreen({super.k..
Hac. Dog ๐ŸŒญ
Hac. Dog : Blog