fromName static method

StateMutability? fromName(
  1. String? name
)

Retrieves a StateMutability instance based on its name (case-insensitive).

Implementation

static StateMutability? fromName(String? name) {
  try {
    return values
        .firstWhere((element) => element.name == name?.toLowerCase());
  } on StateError {
    return null;
  }
}