parseU16 static method

int parseU16({
  1. Object? value,
})

Parses a value into an unsigned 16-bit integer (0–65,535).

Implementation

static int parseU16({Object? value}) {
  try {
    final toint = IntUtils.parse(value);
    return toint.asU16;
  } catch (e) {
    throw BcsSerializationException(
      "Invalid value for move type 'U16': Expected an unsigned 16-bit integer (0–65,535).",
      details: {"value": "$value"},
    );
  }
}