我正在做一个关于颤振的项目,我的 listView 有问题。
当我向下滚动提要时,我的列表视图半径看起来像这样(边框在两张照片的正下方):
所以基本上我想要的是将两张照片作为浮动照片和最新的帖子放在它下面。
但我希望列表看起来像这样:
有人对这个问题有任何想法吗?
检查下面的代码:
Column(
children: [
Padding(
padding: const EdgeInsets.only(
left: 20.0, right: 20.0, top: 10.0, bottom: 20.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Expanded(
child: TeamImageContainer(
data: data[0],
onNavigate: () {
Navigator.of(context).pushNamed(
TeamStatisticViewScreen.routeName,
arguments: data[0].id);
},
),
),
SizedBox(
width: 10,
),
Expanded(
child: TeamImageContainer(
data: data[1],
onNavigate: () {
Navigator.of(context).pushNamed(
TeamStatisticViewScreen.routeName,
arguments: data[1].id);
},
),
),
],
),
),
Expanded(
child: SingleChildScrollView(
child: Column(
children: [
Container(
decoration: BoxDecoration(
// color: Colors.black38,
gradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [Colors.transparent, Colors.black38],
stops: [-0.1, 0.5],
tileMode: TileMode.clamp,
),
borderRadius: BorderRadius.only(
topLeft: Radius.circular(20),
topRight: Radius.circular(20.0)),
),
margin: const EdgeInsets.only(top: 20.0),
child: Column(
children: [
Padding(
padding: const EdgeInsets.only(
right: 20,
left: 20,
bottom: 20.0,
top: 20.0),
child: SizedBox(
width: double.infinity,
child: Align(
alignment: Alignment.topLeft,
child: Text(
'Latest Posts',
style: TextStyle(
color: Color(0xffe0e6f3),
fontSize: 18,
fontFamily: 'SFProText',
fontWeight: FontWeight.w600,
),
),
),
),
),
Column(
children: _postsData.loadedLatestPosts
.map(
(data) => PostsListWidget(data),
)
.toList(),
),
],
),
),
],
),
),
),
],
),