note: do not rename if name textbox is empty
parent
5bde0d383e
commit
1997677fb2
|
@ -124,11 +124,13 @@ class MyListTileState extends State<MyListTile> {
|
|||
child: Text('No')),
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
widget.toggleFunction(widget.file, false);
|
||||
widget.storage.renameNote(
|
||||
basename(widget.file.path), _controller.text);
|
||||
_controller.text = "";
|
||||
if (_controller.text != "") {
|
||||
Navigator.pop(context);
|
||||
widget.toggleFunction(widget.file, false);
|
||||
widget.storage.renameNote(
|
||||
basename(widget.file.path), _controller.text);
|
||||
_controller.text = "";
|
||||
}
|
||||
},
|
||||
child: Text('Yes')),
|
||||
],
|
||||
|
|
Loading…
Reference in New Issue