disconnectReason property

DisconnectReason? get disconnectReason

The most recent disconnection reason

Implementation

DisconnectReason? get disconnectReason {
  if (FlutterBluePlus._connectionStates[remoteId] == null) {
    return null;
  }
  int? code =
      FlutterBluePlus._connectionStates[remoteId]!.disconnectReasonCode;
  String? description =
      FlutterBluePlus._connectionStates[remoteId]!.disconnectReasonString;
  return DisconnectReason(_nativeError, code, description);
}