<分区>
这是我的代码,它简单地使用了 listView 构建器。滚动 ListView 意外地落后于行小部件上方。关于应该使用哪个小部件而不是 listView 构建器的任何建议?
Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
children: [
Row(
children: [
Text(
'Sorted By',
style: Theme.of(context).textTheme.caption?.copyWith(
color: AppColors.labelText, fontSize: 14),
).paddingForOnly(right: 20),
sortButtons()
],
),
Text(
'List of Report',
style: Theme.of(context)
.textTheme
.bodyText1
?.copyWith(color: AppColors.profileLabel),
).paddingForOnly(top: 30, bottom: 10),
Flexible(
child:
ListView.builder(
itemBuilder: (context, index) => ListTile(
onTap: () {
Application.customNavigation(
context: context,
path: ReportDetailScreen.route);
},
tileColor: AppColors.listTileBG,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(15)),
leading: Image.asset(AssetsPath.calendarSymbol),
title: Text(
'Monday, Aug 05',
style: textTheme.bodyText2?.copyWith(
color: Colors.black,
fontWeight: FontWeight.w500),
),
).paddingWithSymmetry(vertical: 4))),
//Expanded(child: reportList(context))
],
),
谢谢你