CsvToListConverter class
A Csv converter that returns the individual rows as lists of values.
This converter follows the rules of rfc4180.
See the CsvParser
for more information.
- Inheritance
-
- Object
- StreamTransformerBase<
String, List> - CsvToListConverter
Constructors
- CsvToListConverter({String? fieldDelimiter = defaultFieldDelimiter, String? textDelimiter = defaultTextDelimiter, String? textEndDelimiter, String? eol = defaultEol, CsvSettingsDetector? csvSettingsDetector, bool? shouldParseNumbers, bool? allowInvalid, dynamic convertEmptyTo})
-
The default values for the optional arguments are consistent with
rfc4180.
const
Properties
- allowInvalid → bool
-
See
CsvParser.allowInvalid
final - convertEmptyTo → dynamic
-
Convert empty value to this instead of
null
.final - csvSettingsDetector → CsvSettingsDetector?
-
An optional csvSettingsDetector. See CsvSettingsDetector.
final
- eol → String?
-
The end of line character which is expected after "row".
final
- fieldDelimiter → String?
-
The separator between fields.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shouldParseNumbers → bool
-
Should we try to parse unquoted text to numbers (int and doubles)
final
- textDelimiter → String?
-
The delimiter which (optionally) surrounds text / fields.
final
- textEndDelimiter → String?
-
The end delimiter for text. This allows text to be quoted with different
start / end delimiters: Example: «abc».
final
Methods
-
bind(
Stream< String> stream) → Stream<List> -
Transforms the provided
stream
.override -
cast<
RS, RT> () → StreamTransformer< RS, RT> -
Provides a
StreamTransformer<RS, RT>
view of this stream transformer.inherited -
convert<
E extends dynamic> (String? csv, {String? fieldDelimiter, String? textDelimiter, String? textEndDelimiter, String? eol, CsvSettingsDetector? csvSettingsDetector, bool? shouldParseNumbers, bool? allowInvalid, dynamic convertEmptyTo}) → List< List< E> > -
Parses the
csv
and returns a List (rows) of Lists (columns). -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
startChunkedConversion(
Sink outputSink) → CsvToListSink -
outputSink
must be of type Sink -
toString(
) → String -
A string representation of this object.
inherited
-
verifyCurrentSettings(
{bool? throwError}) → List< ArgumentError> - Verifies current settings.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
verifySettings(
String? fieldDelimiter, String? textDelimiter, String? textEndDelimiter, String? eol, {bool? throwError}) → List< ArgumentError> - Verifies settings.