Principal.create constructor

Principal.create(
  1. int uSize,
  2. Uint8List data,
  3. Uint8List? subAccount
)

Implementation

factory Principal.create(int uSize, Uint8List data, Uint8List? subAccount) {
  if (uSize > data.length) {
    throw RangeError.range(
      uSize,
      null,
      data.length,
      'size',
      'Size must within the data length',
    );
  }
  return Principal(data.sublist(0, uSize), subAccount: subAccount);
}