subtitle: Text(s.fullUsername),
trailing: const Icon(Icons.navigate_next),
leading: PopupMenuButton(
- icon: const Icon(Icons.more_vert, color: Colors.green),
+ icon: const Icon(Icons.more_vert,
+ color: Colors.green),
itemBuilder: (context) => [
PopupMenuItem(
child: ListTile(
(b) => b..ticket = ''))
.saveToDisk();
refreshFromStorage();
- Navigator.of(context).pop();
+ if (context.mounted) {
+ Navigator.of(context).pop();
+ }
},
),
),
b..passwordSaved = false))
.saveToDisk();
refreshFromStorage();
- Navigator.of(context).pop();
+ if (context.mounted) {
+ Navigator.of(context).pop();
+ }
},
),
),
(b) => b.logins.remove(login))
.saveToDisk();
refreshFromStorage();
- Navigator.of(context).pop();
+ if (context.mounted) {
+ Navigator.of(context).pop();
+ }
},
),
),
password = await getPassword(user.identifier!);
}
- final client = await Navigator.of(context).push(MaterialPageRoute(
- builder: (context) => ProxmoxLoginPage(
- userModel: user,
- isCreate: isCreate,
- ticket: ticket,
- password: password,
- )));
- refreshFromStorage();
- if (client != null) {
- widget.onLogin!(client);
+ if (mounted) {
+ final client = await Navigator.of(context).push(MaterialPageRoute(
+ builder: (context) => ProxmoxLoginPage(
+ userModel: user,
+ isCreate: isCreate,
+ ticket: ticket,
+ password: password,
+ )));
+ refreshFromStorage();
+ if (client != null) {
+ widget.onLogin!(client);
+ }
}
}