tryDecode static method

String? tryDecode(
  1. List<int>? value, [
  2. StringEncoding type = StringEncoding.utf8
])

Implementation

static String? tryDecode(List<int>? value,
    [StringEncoding type = StringEncoding.utf8]) {
  if (value == null) return null;
  try {
    return decode(value, type);
  } catch (e) {
    return null;
  }
}