detach method
Detaches the active sessionRef (empty = sole active), then refreshes.
Implementation
Future<ActionResult> detach(String sessionRef) async {
try {
final r = await _service.detachSession(nodeId, sessionRef: sessionRef);
await refresh();
final msg = r.message.isNotEmpty
? r.message
: (r.ok ? 'Detached ${r.shortId}.' : 'Detach failed.');
return ActionResult(r.ok, msg);
} on AppError catch (e) {
return ActionResult(false, e.message);
}
}