parseU8 static method

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

Parses a value into an unsigned 8-bit integer (0–255).

Implementation

static int parseU8({Object? value}) {
  try {
    final toint = IntUtils.parse(value);
    return toint.asUint8;
  } catch (e) {
    throw BcsSerializationException(
        "Invalid value for move type 'U8': Expected an unsigned 8-bit integer (0–255).",
        details: {"value": "$value"});
  }
}