calculateFirstUnMatchedIndex function
Implementation
int calculateFirstUnMatchedIndex(
{required List<String> currentList, required List<String> oldList}) {
if (currentList.length < oldList.length ||
currentList.length > oldList.length) {
return 0;
} else {
for (int i = 0; i < oldList.length; i++) {
if (currentList[i] != oldList[i]) {
return i;
}
}
}
return 0;
}