clone<T> method

List<T> clone<T>()

Implementation

List<T> clone<T>() {
  List<T> jsonData = [];

  for (var i = 0; i < length; i++) {
    T data_loop = this[i];
    if (data_loop is Map) {
      jsonData.add(data_loop.clone() as T);
    } else if (data_loop is List) {
      jsonData.add(data_loop.clone() as T);
    } else {
      jsonData.add(data_loop);
    }
  }
  return jsonData;
}