operator [] method
Gets value for header
from the current record. If header
is an int, it is interpreted as the
column index. If header
is a String, it is used to lookup the header and find the column index.
Implementation
String? operator [](dynamic header) {
if (header is int) {
return get('', header);
} else if (header is String) {
return get(header, -1);
} else {
throw InvalidHeaderException(
'Invalid header type ${header.runtimeType}: extected int or String');
}
}