encodeString method Null safety

String encodeString(
  1. String utf8string,
  2. {Encoding encoding = Encoding.standardRFC4648}
)

Takes in a utf8string, converts the string to a byte list and runs a normal encode() on it. Returning a String representation of the base32.

Implementation

static String encodeString(String utf8string,
    {Encoding encoding = Encoding.standardRFC4648}) {
  return encode(Uint8List.fromList(utf8string.codeUnits), encoding: encoding);
}