Mic*_*ael 6 flutter flutter-sliver
I\xc2\xb4m 使用SliverList和SliverChildBuilderDelegate来动态生成列表项。现在,我\xc2\xb4m 尝试允许用户通过拖放到一行中每个项目上的手柄图标来重新排序列表项目。
\n\n我\xc2\xb4ve尝试了不同的东西(比如Draggable Widget),但到目前为止我还没有\xc2\xb4t找到解决方案。有没有人已经使用 SliverList 小部件进行拖放重新排序并可以给我提示?
\n\n使用 ReorderableListView Widget 是不可能的,会导致将 ListView 混合到 SliverList。我想使用 SliverAppBar 来允许滚动时淡出效果,如下所示: https: //medium.com/flutter-io/slivers-demystified-6ff68ab0296f
\n\n这里\xc2\xb4s是我的SliverList的结构:
\n\nreturn Scaffold(\n body: RefreshIndicator(\n ...\n child: CustomScrollView(\n ...\n slivers: <Widget>[\n SliverAppBar(...),\n SliverList(\n delegate: SliverChildBuilderDelegate(...),\n )\n ...\nRun Code Online (Sandbox Code Playgroud)\n\n预先致谢,最好的,\n迈克尔
\n| 归档时间: |
|
| 查看次数: |
6776 次 |
| 最近记录: |