columnForName method Null safety
- String name
Returns a SchemaColumn with name
.
Case-insensitively compares names of columns with name
. Returns null if no column exists
with name
.
Implementation
SchemaColumn? columnForName(String name) {
final lowercaseName = name.toLowerCase();
return columns
.firstWhereOrNull((col) => col.name.toLowerCase() == lowercaseName);
}