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(
sectionsIn: sections,
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 {
final String configurationId;
final List<SectionDTO> sectionsIn;
final ValueChanged<List<SectionDTO>> onChanged;
const SectionReorderList({
Key key,
this.configurationId,
this.sectionsIn,
this.onChanged,
}) : super(key: key);
@override
@ -49,7 +47,8 @@ class _SectionReorderListState extends State<SectionReorderList> {
i++;
});
widget.onChanged(sections);
//widget.onChanged(sections);
// TODO SAVE SECTION ALSO WHEN SAVE CONFIG
},
);
}