getByteCount method Null safety

int getByteCount(
  1. String chars
)

Calculates the number of bytes produced by encoding the characters in the specified.

Implementation

int getByteCount(String chars) => getBytes(chars).length;