fix null check

This commit is contained in:
Морозов Андрей 2021-11-10 11:37:25 +00:00
parent 41de1ba314
commit f20cb1fef0
1 changed files with 10 additions and 1 deletions

View File

@ -101,7 +101,15 @@ class _DrawingPageState extends State<DrawingPage> {
),
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<DrawingPage> {
dfsAccessTable = null;
startDot = null;
endDot = null;
clearInputData();
});
}),
createButton(graphData.getUseLengthStr(), changeLength),