getStringsWithList method

void getStringsWithList(
  1. int amount,
  2. List<String> intoArray, [
  3. int startIndex = 0
])

Populates a String array with strings retrieved from the message.

amount : The amount of strings to retrieve. intoArray : The array to populate. startIndex : The position at which to start populating the array.

Implementation

void getStringsWithList(int amount, List<String> intoArray,
    [int startIndex = 0]) {
  if (startIndex + amount > intoArray.length) {
    throw ArgumentError(_arrayNotLongEnoughError(
        amount, intoArray.length, startIndex, stringName));
  }

  for (int i = 0; i < amount; i++) {
    intoArray[startIndex + i] = getString();
  }
}