TCsvHeaderMapping class

Manages mapping between expected schema columns and actual CSV headers.

Constructors

TCsvHeaderMapping([Map<String, String?>? initial])

Properties

hashCode → int
The hash code for this object.
no setterinherited
mapping → Map<String, String?>
Maps each TCsvColumn.key to the selected CSV header name (or null if unmapped).
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

clone() → TCsvHeaderMapping
Creates a copy of this mapping.
getUnmappedRequired(List<TCsvColumn> expectedColumns) → List<TCsvColumn>
Returns the list of required columns that are currently unmapped.
isComplete(List<TCsvColumn> expectedColumns) → bool
Returns whether all required columns have been mapped to a CSV header.
mapRow({required List<TCsvColumn> expectedColumns, required List<String> csvHeaders, required List<String> csvRow}) → Map<String, dynamic>
Maps a single raw CSV row into a typed map according to this mapping.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

areAllHeadersIdentical(List<TCsvColumn> expectedColumns, List<String> csvHeaders) → bool
Checks if all CSV headers match the expected column headers exactly in name.
autoMap({required List<TCsvColumn> expectedColumns, required List<String> csvHeaders}) → TCsvHeaderMapping
Automatically generates mapping between expected columns and CSV headers.