Skip to content

Commit 813ce06

Browse files
Undo add in DictNoTreeWidget
1 parent bc927f4 commit 813ce06

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

lib/templates/dict_no_tree_widget.dart

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,14 @@ class _DictDictNoTreeWidgetState extends State<DictDictNoTreeWidget> with Ticker
6666
arrowAnimationController,
6767
Tween(begin: 0.0, end: pi).animate(arrowAnimationController),
6868
]);
69+
globals.undoList.add(() {
70+
final index = _controllers.indexOf(list);
71+
_dict.remove(key);
72+
_controllers.removeAt(index);
73+
_textBefore.removeAt(index);
74+
_animationList.removeAt(index);
75+
_setValue(null);
76+
});
6977
_setValue(null);
7078
}
7179

0 commit comments

Comments
 (0)