Add remove mount capabilities to CLI and UI #62
This commit is contained in:
@@ -94,12 +94,36 @@ class _MountWidgetState extends State<MountWidget>
|
||||
setState(() {
|
||||
_enabled = false;
|
||||
});
|
||||
|
||||
await mount.remove();
|
||||
|
||||
setState(() {
|
||||
_enabled = true;
|
||||
});
|
||||
return doShowDialog(
|
||||
context,
|
||||
AlertDialog(
|
||||
actions: [
|
||||
TextButton(
|
||||
child: const Text('Yes'),
|
||||
onPressed: () async {
|
||||
await mount.remove();
|
||||
setState(() {
|
||||
_enabled = true;
|
||||
});
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
),
|
||||
TextButton(
|
||||
child: const Text('No'),
|
||||
onPressed: () {
|
||||
setState(() {
|
||||
_enabled = true;
|
||||
});
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
),
|
||||
],
|
||||
title: const Text(
|
||||
'Are you sure?',
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
: null,
|
||||
),
|
||||
|
Reference in New Issue
Block a user