Add remove mount capabilities to CLI and UI #62
This commit is contained in:
@@ -94,12 +94,36 @@ class _MountWidgetState extends State<MountWidget>
|
|||||||
setState(() {
|
setState(() {
|
||||||
_enabled = false;
|
_enabled = false;
|
||||||
});
|
});
|
||||||
|
return doShowDialog(
|
||||||
|
context,
|
||||||
|
AlertDialog(
|
||||||
|
actions: [
|
||||||
|
TextButton(
|
||||||
|
child: const Text('Yes'),
|
||||||
|
onPressed: () async {
|
||||||
await mount.remove();
|
await mount.remove();
|
||||||
|
|
||||||
setState(() {
|
setState(() {
|
||||||
_enabled = true;
|
_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,
|
: null,
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user