fix null check
This commit is contained in:
parent
41de1ba314
commit
f20cb1fef0
|
@ -101,7 +101,15 @@ class _DrawingPageState extends State<DrawingPage> {
|
||||||
),
|
),
|
||||||
actions: [
|
actions: [
|
||||||
IconButton(
|
IconButton(
|
||||||
onPressed: () => graphData.flushData(),
|
onPressed: () {
|
||||||
|
setState(() {
|
||||||
|
startDot = null;
|
||||||
|
endDot = null;
|
||||||
|
bfsPath = null;
|
||||||
|
dfsAccessTable = null;
|
||||||
|
graphData.flushData();
|
||||||
|
});
|
||||||
|
},
|
||||||
icon: const Icon(Icons.delete_sweep),
|
icon: const Icon(Icons.delete_sweep),
|
||||||
iconSize: 60,
|
iconSize: 60,
|
||||||
),
|
),
|
||||||
|
@ -126,6 +134,7 @@ class _DrawingPageState extends State<DrawingPage> {
|
||||||
dfsAccessTable = null;
|
dfsAccessTable = null;
|
||||||
startDot = null;
|
startDot = null;
|
||||||
endDot = null;
|
endDot = null;
|
||||||
|
clearInputData();
|
||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
createButton(graphData.getUseLengthStr(), changeLength),
|
createButton(graphData.getUseLengthStr(), changeLength),
|
||||||
|
|
Loading…
Reference in New Issue