Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. # reorderables <code> _buildSection() { // 선택한 pantry 에 대해 admin 권한을 가졌는가? var pantryUserEdge = _pantryStore.pantryUserEdgeList .firstWhereOrNull((e) => e.userId == _settingStore.user?.objectId); if (pantryUserEdge == null || pantryUserEdge.authority < AuthorityConst.admin) { return []; } return [ SliverToBoxAdapter( child: SectionTitle( text: 'Section', ), ), Observer( builder: (ctx) { return ReorderableSliverList( // delegate: ReorderableSliverChildListDelegate(sectionWidget), delegate: ReorderableSliverChildBuilderDelegate( (BuildContext context, int index) { var section = _pantryStore.sectionList[index]; return SectionRow(section: section); }, childCount: _pantryStore.sectionList.length), onReorder: (int oldIndex, int newIndex) { _pantryStore.sectionReorder(oldIndex, newIndex); }, ); }, ) ]; } </code> ## 출처 - https://pub.dev/packages/reorderables open/flutter-reorderables.txt Last modified: 2024/10/05 06:15by 127.0.0.1