Improve supportsInAppPairing documentation

This commit is contained in:
Foti Dim
2024-09-19 22:36:09 +02:00
parent b978b81cb1
commit c57cc778da
2 changed files with 10 additions and 9 deletions
+9 -8
View File
@@ -2,14 +2,15 @@ import 'package:flutter/foundation.dart';
class BleCapabilities {
/// Returns true if pairing is possible either by API or by encrypted characteristic.
///
/// All platforms support this except Web/Windows and Web/Linux.
///
/// On `Web/Windows` and `Web/Linux` it is known to only work for devices that require passkey pairing.
/// If your device requires passkey pairing you can consider this true for all platforms.
///
/// `Web/Linux` could under certain circumstances present a pairing dialog also for devices that do
/// not use passkey pairing but it very unreliable so we consider it unsupported.
///
/// All platforms return true except Web/Windows and Web/Linux which return false.
///
/// Under conditions, `Web/Windows` and `Web/Linux` could still trigger in-app pairing.
/// Peripherals that require "Numeric Comparison" or "Passkey Entry" can
/// successfully trigger pairing.
///
/// `Web/Linux` could also, under certain conditions, trigger "Just Works" pairing
/// but it very unreliable, therefore we return false.
static final bool supportsInAppPairing =
_triggersPairingWithEncryptedChar || hasSystemPairingApi;
+1 -1
View File
@@ -236,7 +236,7 @@ class UniversalBle {
/// You can optionally pass a pairingCommand if you know an encrypted read or write characteristic.
/// If you do, it returns true if it can successfully execute the command after pairing.
///
/// On `Web/Windows` and `Web/Linux` it is known to work only for devices that require passkey pairing.
/// On `Web/Windows` and `Web/Linux` it does not work for devices that use "Just Works" pairing.
static Future<bool?> pair(
String deviceId, {
BleCommand? pairingCommand,