inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

Munhaeng Lee님의 게시글

Munhaeng Lee Munhaeng Lee

@leemunhaeng0255

수강평 작성수
3
평균평점
5.0

게시글 1

질문&답변

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]; }); }), ) ], )); }

좋아요수
2
댓글수
6
조회수
567