向左摆动对齐listview



你好,我正试图将ListView小部件向左对齐,这是一段代码:

Column(children: [
Container(
alignment: Alignment.centerRight,
child: TextButton(
onPressed: () => _removeOptionForm(variantList),
child: Text("remove option")),
),
Row(children: [
Flexible(
child: Column(children: [
Container(
height: 50.0,
alignment: Alignment.centerRight,
child: ListView.builder(
key: UniqueKey(),
scrollDirection: Axis.horizontal,
itemCount: optionFormValueList.length,
itemBuilder: (BuildContext context, int index) {
return optionFormValueList[index];
})),
TextFormField(
controller: _optionNameController,
keyboardType: TextInputType.text,
autocorrect: false,

ListView始终保持在右边,即使我把它包装在Container上,最后一个包装在Column上。

创建类似的Listview生成器

return ListView.builder(shrinkWrap:true,physics:NeverScrollableScrollPhysics((,itemCount:数据!。长itemBuilder:(上下文,索引(=>列(crossAxisAlignment:crossAxisAlignment.start,

相关内容

  • 没有找到相关文章