fix null check
This commit is contained in:
parent
41de1ba314
commit
f20cb1fef0
|
@ -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),
|
||||
|
|
Loading…
Reference in New Issue