Skip to content

Commit

Permalink
Undo add in DictNoTreeWidget
Browse files Browse the repository at this point in the history
  • Loading branch information
trueToastedCode committed Mar 20, 2021
1 parent bc927f4 commit 813ce06
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/templates/dict_no_tree_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,14 @@ class _DictDictNoTreeWidgetState extends State<DictDictNoTreeWidget> with Ticker
arrowAnimationController,
Tween(begin: 0.0, end: pi).animate(arrowAnimationController),
]);
globals.undoList.add(() {
final index = _controllers.indexOf(list);
_dict.remove(key);
_controllers.removeAt(index);
_textBefore.removeAt(index);
_animationList.removeAt(index);
_setValue(null);
});
_setValue(null);
}

Expand Down

0 comments on commit 813ce06

Please sign in to comment.