feat: better pairing broken notification
This commit is contained in:
@ -116,12 +116,11 @@ class _ConnectDevicePageState extends ConsumerState<ConnectDevicePage> {
|
||||
}
|
||||
break;
|
||||
case Err(:final v):
|
||||
final error = v.toString();
|
||||
if (error.toLowerCase().contains('disconnected')) {
|
||||
if (isBluetoothPairingRecoveryError(v)) {
|
||||
await showBluetoothPairingRecoveryDialog(context);
|
||||
} else {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(content: Text('Connection unsuccessful:\n$error')),
|
||||
SnackBar(content: Text('Connection unsuccessful:\n$v')),
|
||||
);
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user