profile
android, ios developer

[Flutter] Column안에 ListView.builder 를 내용만큼 height 주기

Column안에 여러 개의 ListView.builder를 사용해보려 하였더니, 아래와 같은 오류가 발생했다. 오류 내용 > FlutterError (Vertical viewport was given unbounded height. Viewports expand in the scrolling direction to fill their container. In this case, a vertical viewport was given an unlimited amount of vertical space in which to expand. This situation typically happens when a scrollable widget is nested inside another scrollable widget. If this widget is always nested in a scrollable widget there is no need to use a viewport be

2023년 4월 29일
·
0개의 댓글
·

[Flutter] Column children 유동적으로 add 하는 방법

한 화면에 서브 타이틀과 그에 해당하는 리스트들이 있는 경우, 각 아이템 리스트에 ListView.builder를 하게 되면, 전체 스크롤(SingleChildScrollView)과 부분 스크롤(ListView.builder)을 하는데 있어서, 부분 스크롤 때문에 전체 스크롤 영역이 애매할 것이다. 그렇기 때문에 전체 스크롤(SingleChildScrollView)과 각 타이틀이 갖는 아이템 리스트들을 Column으로 이용해 아이템 리스트에 스크롤이 없도록 ui를 작성해보았다. 예를들어, 아래와 같이 "참여 중인 모임", "승인 대기 중인 모임", "내가 찜한 모임"이 갖는 리스트들은 각 갯수에 맞는 높이를 가져야 하는데 이는 아래와 같이 사용하면 된다. 이때, Column(children: co

2023년 4월 29일
·
0개의 댓글
·