ConnectionId.fromUint8List constructor

ConnectionId.fromUint8List(
  1. Uint8List _bytes
)

Creates a ConnectionId from a Uint8List.

This is a more efficient constructor if you already have a Uint8List. Throws an ArgumentError if the length of bytes is not equal to cidLength.

Implementation

ConnectionId.fromUint8List(this._bytes) {
  if (_bytes.length != cidLength) {
    throw ArgumentError('ConnectionId must be $cidLength bytes long');
  }
}