feat(ui): add themed shell navigation
This commit is contained in:
@ -181,6 +181,10 @@ class _DevicesListState extends ConsumerState<DevicesList> {
|
||||
timeout: const Duration(seconds: 10),
|
||||
);
|
||||
|
||||
if (!context.mounted) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (result.isOk()) {
|
||||
context.go('/device/${device.deviceAddress}');
|
||||
} else {
|
||||
@ -193,13 +197,18 @@ class _DevicesListState extends ConsumerState<DevicesList> {
|
||||
);
|
||||
}
|
||||
} catch (e) {
|
||||
if (!context.mounted) {
|
||||
return;
|
||||
}
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(content: Text('Error: ${e.toString()}')),
|
||||
);
|
||||
} finally {
|
||||
setState(() {
|
||||
_connectingDeviceId = null;
|
||||
});
|
||||
if (context.mounted) {
|
||||
setState(() {
|
||||
_connectingDeviceId = null;
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
child: DeviceListItem(
|
||||
|
||||
Reference in New Issue
Block a user