나는 새로운 떨림이를 만들고 싶어 디자인,그것은 잠시 나를 찾을 사용하는 것,그러나 이제까지 시도하는 코드 사용 Listview 그것은 나에게 오류 또는 카라 정렬하트.
0
당신이 사용할 수 있습트 및 반환하는 카드의 사용자 정의 스타일에서트 빌더는 내가 필요한 디자인입니다.
여기에는 노트의 공식 문서입니다. [문서를1
나는 새로운 떨림이를 만들고 싶어 디자인,그것은 잠시 나를 찾을 사용하는 것,그러나 이제까지 시도하는 코드 사용 Listview 그것은 나에게 오류 또는 카라 정렬하트.
당신이 사용할 수 있습트 및 반환하는 카드의 사용자 정의 스타일에서트 빌더는 내가 필요한 디자인입니다.
여기에는 노트의 공식 문서입니다. [문서를1
려고 아래 코드는 희망의 도움이 있습니다.참조 GridView
기
Center(
child: GridView.builder(
shrinkWrap: true,
padding: const EdgeInsets.symmetric(horizontal: 30),
itemCount: 4,
itemBuilder: (ctx, i) {
return Card(
child: Container(
height: 290,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20)),
margin: EdgeInsets.all(5),
padding: EdgeInsets.all(5),
child: Stack(
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Expanded(
child: Image.network(
'https://tech.pelmorex.com/wp-content/uploads/2020/10/flutter.png',
fit: BoxFit.fill,
),
),
Text(
'Title',
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.bold,
),
),
Row(
children: [
Text(
'Subtitle',
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 15,
),
),
],
)
],
),
],
),
),
);
},
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 2,
childAspectRatio: 1.0,
crossAxisSpacing: 0.0,
mainAxisSpacing: 5,
mainAxisExtent: 264,
),
),
),