utf8Encode static method

List<int> utf8Encode(
  1. String value
)

Implementation

static List<int> utf8Encode(String value) {
  try {
    return utf8.encode(value);
  } catch (_) {
    return [];
  }
}