Add TODO (save section when reorder)

This commit is contained in:
Thomas Fransolet 2021-05-28 19:54:14 +02:00
parent 700201ed00
commit dbe395535e
2 changed files with 2 additions and 9 deletions

View File

@ -260,12 +260,6 @@ class _ConfigurationDetailScreenState extends State<ConfigurationDetailScreen> {
child: SectionReorderList( child: SectionReorderList(
sectionsIn: sections, sectionsIn: sections,
configurationId: configurationDTO.id, configurationId: configurationDTO.id,
onChanged: (List<SectionDTO> sectionsOut) {
print("onChanged parent SectionReorderList");
sections = sectionsOut;
print(sections[0].label);
print(sections[1].label);
},
), ),
), ),
), ),

View File

@ -13,12 +13,10 @@ import 'package:provider/provider.dart';
class SectionReorderList extends StatefulWidget { class SectionReorderList extends StatefulWidget {
final String configurationId; final String configurationId;
final List<SectionDTO> sectionsIn; final List<SectionDTO> sectionsIn;
final ValueChanged<List<SectionDTO>> onChanged;
const SectionReorderList({ const SectionReorderList({
Key key, Key key,
this.configurationId, this.configurationId,
this.sectionsIn, this.sectionsIn,
this.onChanged,
}) : super(key: key); }) : super(key: key);
@override @override
@ -49,7 +47,8 @@ class _SectionReorderListState extends State<SectionReorderList> {
i++; i++;
}); });
widget.onChanged(sections); //widget.onChanged(sections);
// TODO SAVE SECTION ALSO WHEN SAVE CONFIG
}, },
); );
} }