Closed dlcodns closed 1 year ago
container 위젯 크기 지정안해줘서 안보이는거 아닌가요?
방금 다시 해봤는데 각각 컨테이너 감쌌던 flexible 없애니까 됐습니다!
ListView(children: [
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Flexible(
flex:1,
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children:[
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
border: Border.all(width:10,color: Color(0xffEEEAFF)
),
),
child: Image.asset('miso.jpg',fit: BoxFit.contain)),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
border: Border.all(width:10,color: Color(0xffEEEAFF)
),
),
child: Image.asset('TY.png',fit: BoxFit.contain)
),
Container(decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
border: Border.all(width:10,color: Color(0xffEEEAFF)
),
), child: Image.asset('heart.jpg',fit: BoxFit.contain)),
]
),
),
Flexible(
flex:1,
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children:[
Container(decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
border: Border.all(width:10,color: Color(0xffEEEAFF)
),
), child: Image.asset('heart.jpg',fit: BoxFit.contain)),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
border: Border.all(width:10,color: Color(0xffEEEAFF)
),
),
child: Image.asset('kitty.png',fit: BoxFit.contain)
),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
border: Border.all(width:10,color: Color(0xffEEEAFF)
),
),
child: Image.asset('TY.png',fit: BoxFit.contain)
),
] ),
),
],
),
]
),
이런 식으로 나타내려고 합니다.
코드는 flex로 1:1 나눠서 세로 두 줄을 먼저 만들고 row로 묶어줘 위 대시보드 모양을 만들려고 했습니다. 마지막으로 listview로 colunm대신 감싸주어 스크롤 하려고 했는데 화면이 텅 비어보입니다