Continue trying to fix issue with edited items not notifying parent.
This commit is contained in:
parent
88d57e217f
commit
8d7591b766
@ -473,7 +473,8 @@ class _TrackedItemInputDialogState extends State<TrackedItemInputDialog> {
|
|||||||
onPressed: () {
|
onPressed: () {
|
||||||
if (_formKey.currentState!.validate()) {
|
if (_formKey.currentState!.validate()) {
|
||||||
_formKey.currentState!.save();
|
_formKey.currentState!.save();
|
||||||
setState(() {
|
setState(
|
||||||
|
() {
|
||||||
switch (_type) {
|
switch (_type) {
|
||||||
case ItemType.expense:
|
case ItemType.expense:
|
||||||
Expense expense = Expense(
|
Expense expense = Expense(
|
||||||
@ -533,9 +534,10 @@ class _TrackedItemInputDialogState extends State<TrackedItemInputDialog> {
|
|||||||
"No code for type ${_type!.title}",
|
"No code for type ${_type!.title}",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
});
|
|
||||||
widget.notifyParent();
|
widget.notifyParent();
|
||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
|
},
|
||||||
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
icon: Icon(Icons.save),
|
icon: Icon(Icons.save),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user