Add TODO (save section when reorder)
This commit is contained in:
parent
700201ed00
commit
dbe395535e
@ -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);
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@ -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
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user