fromCode static method

TelephonySmsErrorCode fromCode(
  1. String? code
)

Maps a platform error code onto its enum value, falling back to unknown.

Implementation

static TelephonySmsErrorCode fromCode(String? code) {
  for (final value in TelephonySmsErrorCode.values) {
    if (value.code == code) return value;
  }
  return TelephonySmsErrorCode.unknown;
}