fromValue static method

PlutusDataType fromValue(
  1. int? value
)

Constructs a PlutusDataType from its numeric value.

Implementation

static PlutusDataType fromValue(int? value) {
  return values.firstWhere(
    (element) => element.value == value,
    orElse: () => throw MessageException(
        "No PlutusDataType found matching the specified value",
        details: {"value": value}),
  );
}