diff --git a/flutter/lib/pages/drawing_page.dart b/flutter/lib/pages/drawing_page.dart index 426256d..7b87a0b 100644 --- a/flutter/lib/pages/drawing_page.dart +++ b/flutter/lib/pages/drawing_page.dart @@ -101,7 +101,15 @@ class _DrawingPageState extends State { ), actions: [ IconButton( - onPressed: () => graphData.flushData(), + onPressed: () { + setState(() { + startDot = null; + endDot = null; + bfsPath = null; + dfsAccessTable = null; + graphData.flushData(); + }); + }, icon: const Icon(Icons.delete_sweep), iconSize: 60, ), @@ -126,6 +134,7 @@ class _DrawingPageState extends State { dfsAccessTable = null; startDot = null; endDot = null; + clearInputData(); }); }), createButton(graphData.getUseLengthStr(), changeLength),