fromBom static method

UtfType fromBom(
  1. List<int> buffer
)

Determine UTF type based on a sequence of bytes

Implementation

static UtfType fromBom(List<int> buffer) {
  return _bomMap.keys
      .firstWhere((x) => buffer.startsWith(_bomMap[x]!), orElse: () => none);
}