zip function Null safety

List zip(
  1. List firstArray,
  2. List secondArray,
  3. List values

Creates an array of grouped elements, the first of which contains the first elements of the given arrays, the second of which contains the second elements of the given arrays, and so on.


List zip(List firstArray, List secondArray, List values) {
  var result = <List>[];
  for (var i = 0; i < firstArray.length; i++) {
    result.add([firstArray[i], secondArray[i], values[i]]);
  return result;