【发布时间】:2022-01-15 15:01:07
【问题描述】:
我需要帮助来创建可滚动的正文: my screen
这就是我的身体结构:build()
body: Padding(
padding: const EdgeInsets.all(30.0),
child: DragAndDropLists(
children: _contents,
onItemReorder: _onItemReorder,
onListReorder: _onListReorder,
axis: Axis.horizontal,
listWidth: 300,
listDraggingWidth: 300,
listPadding: EdgeInsets.all(20.0),
itemDivider: const Divider(
thickness: 4,
height: 10,
color: lightBlue,
),
itemDecorationWhileDragging: BoxDecoration(
color: Colors.white,
boxShadow: [
BoxShadow(
color: const Color(0xff004269).withOpacity(0.5),
spreadRadius: 2,
blurRadius: 3,
offset: const Offset(0, 0), // changes position of shadow
),
],
),
listInnerDecoration: BoxDecoration(
color: Theme.of(context).canvasColor,
borderRadius: BorderRadius.all(Radius.circular(5)),
),
lastItemTargetHeight: 2,
addLastItemTargetHeightToTop: true,
lastListTargetSize: 40,
),
),
我已经尝试过 ListView、SingleChildScrollView、Column 我不知道为什么,但它不起作用
也许有人知道我可以改变什么来查看滚动条并可以水平滚动它 谢谢
【问题讨论】:
-
SingleChildScrollView(scrollDirection:Axis.horizontal),
标签: flutter flutter-layout flutter-web