readIdentity method

  1. @override
Future<Uint8List> readIdentity(
  1. String token, {
  2. Duration? timeout,
})
override

Reads the identity characteristic (the peer ID bytes) of the device that advertises token. The GATT connection this opens is kept for a short time, so that a connect right after it does not connect again.

Implementation

@override
Future<Uint8List> readIdentity(String token, {Duration? timeout}) async {
  await Future<void>.delayed(_network.latency);
  return Uint8List.fromList(_find(token)._identity!);
}