pubspec.yaml์ ์บ๋ก์
์ฌ๋ผ์ด๋ ์ถ๊ฐ์
๊ฐ์ฌ๋์ด ๋ง์ํ์ ๋๋ก, CarouselSlider ๋ฒ์ ผ์ด ๋ณ๊ฒฝ๋๋ฉด์ ๊ตฌ์กฐ๊ฐ ์ข ๋ฐ๋๋ฏ ํฉ๋๋ค. ์๋์ฒ๋ผ onPageChanged ํญ๋ชฉ์ options ์์ผ๋ก ๋ฃ์ผ๋ฉด ๋ฉ๋๋ค. @override Widget build(BuildContext context) { return Container( child: Column( children: Widget>[ Container( padding: EdgeInsets.all(20), ), CarouselSlider( items: images, options: CarouselOptions(onPageChanged: (index, reason) { setState(() { _currentPage = index; _currentKeyword = keywords[_currentPage]; }); }), ) ], )); }