동적1 [flutter] gridview 사이즈에 맞게 높이 조절하기 -item의 수에 따라 높이 조절(사진 접었다가 펴기) 사진이 여러장인 경우 간단하게 보이고 싶을 때 사용한다. 사진이 4장인 경우 2장만 보여주고 클릭하면 두장이 더 보이도록 한다. class PhotoScreen extends StatefulWidget { final List photos; const PhotoScreen({Key? key, required this.photos}) : super(key: key); @override _PhotoScreenState createState() => _PhotoScreenState(); } class _PhotoScreenState extends State { @override Widget build(BuildContext context) { return buildPhotoGrid(); } late int it.. 2023. 7. 15. 이전 1 다음