parseString static method

String parseString({
  1. Object? value,
})

Parses a value into a string, validating it's of String type.

Implementation

static String parseString({Object? value}) {
  if (value is String) {
    return value;
  }
  throw BcsSerializationException(
    "Invalid value for move type 'String'.",
    details: {"value": "$value"},
  );
}