wordsToBytes method

Uint8List wordsToBytes(
  1. List<String> words
)

Converts words to Uint8List by concatenating them with a space separator and encoding them as UTF-8.

Implementation

Uint8List wordsToBytes(List<String> words) {
  return Uint8List.fromList(
    utf8.encode(words.join(" ")),
  );
}