CborSignedValue.i64 constructor

CborSignedValue.i64(
  1. dynamic value
)

Implementation

factory CborSignedValue.i64(dynamic value) {
  if (value is! int && value is! BigInt) {
    throw MessageException(
        "Invalid unsgined int. value must be int or bigint.",
        details: {"valye": value});
  }

  if (value is BigInt && value.bitLength > 64) {
    throw MessageException("Invalid signed 64-bit Integer.",
        details: {"Value": value, "bitLength": value.bitLength});
  }
  return CborSignedValue._(value);
}