readStringList method

  1. @override
List<String> readStringList([
  1. int? length,
  2. Converter<List<int>, String> decoder = BinaryReader.utf8Decoder
])
inherited

Read a list of Strings with length.

If length is not provided, it is read first.

Implementation

@override
List<String> readStringList([
  int? length,
  Converter<List<int>, String> decoder = BinaryReader.utf8Decoder,
]) {
  length ??= readUint32();
  final list = List<String>.filled(length, '', growable: true);
  for (var i = 0; i < length; i++) {
    list[i] = readString(null, decoder);
  }
  return list;
}