operator [] method
Indexer of the class
Implementation
Worksheet operator [](dynamic index) {
if (index is String) {
for (int i = 0; i < innerList.length; i++) {
final Worksheet sheet = innerList[i];
if (_equalsIgnoreCase(sheet.name, index)) {
return sheet;
}
}
} else if (index is int) {
return innerList[index];
}
throw Exception('Invalid index or name');
}