rename worky again
This commit is contained in:
parent
a45378a094
commit
3f12b14e8a
2 changed files with 37 additions and 14 deletions
|
@ -51,19 +51,19 @@ class OperationButtons extends StatelessWidget {
|
|||
TextButton(onPressed: () => Navigator.pop(context), child: Text('Cancel')),
|
||||
TextButton(
|
||||
onPressed: () async {
|
||||
// try {
|
||||
// await sftpWorker.rename('${path}${dirEntry.filename}', '${widget.path}${newNameController.text}');
|
||||
// _listDir();
|
||||
// }
|
||||
// on SftpStatusError catch (e) {
|
||||
// if (context.mounted) {
|
||||
// ScaffoldMessenger.of(context).showSnackBar(_buildErrorSnackBar(context, e.message));
|
||||
// }
|
||||
// }
|
||||
// if (context.mounted) {
|
||||
// Navigator.pop(context);
|
||||
// }
|
||||
//
|
||||
try {
|
||||
await sftpWorker.rename('$path${dirEntry.filename}', '$path${newNameController.text}');
|
||||
listDir();
|
||||
}
|
||||
on SftpStatusError catch (e) {
|
||||
if (context.mounted) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(buildErrorSnackBar(context, e.message));
|
||||
}
|
||||
}
|
||||
if (context.mounted) {
|
||||
Navigator.pop(context);
|
||||
}
|
||||
|
||||
},
|
||||
child: Text('Rename')
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue