CsvCodecAdapter class

A dart:convert compatible Codec for CSV data.

Enables .fuse() and other dart:convert pipeline operations.

final codec = CsvCodecAdapter();
final rows = codec.decode('a,b\n1,2');
final csv = codec.encode([[1, 2], [3, 4]]);
Inheritance

Constructors

CsvCodecAdapter([CsvConfig config = const CsvConfig()])
Create an adapter with the given config (defaults to standard CSV).

Properties

config CsvConfig
final
decoder Converter<String, List<List>>
Returns the decoder of this, converting from T to S.
no setteroverride
encoder Converter<List<List>, String>
Returns the encoder from S to T.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
inverted Codec<String, List<List>>
Inverts this.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

decode(String encoded) List<List>
Decodes encoded data.
inherited
encode(List<List> input) String
Encodes input.
inherited
fuse<R>(Codec<String, R> other) Codec<List<List>, R>
Fuses this with other.
inherited
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