TempcordDataParser<P extends ProfileJson, N extends BodyTemperatureRecordNodeCsvRow> constructor

TempcordDataParser<P extends ProfileJson, N extends BodyTemperatureRecordNodeCsvRow>({
  1. required ProfileJsonDataConverter<P> profileConverter,
  2. required BodyTemperatureRecordListCsvConverter<N> btrlConverter,
  3. List<GenericTempcordDataConverter>? additionalConverter,
})

Construct TempcordDataParser.

The format of the exported data must be followed this order:

  1. ProfileJson.
  2. BodyTemperatureRecordListCsv with BodyTemperatureRecordNodeCsvRow.
  3. (Your own implemented additionalConverter).

These order should be return the same type order of readBytes. And no duplicated type defined in additionalConverter.

Implementation

factory TempcordDataParser(
        {required ProfileJsonDataConverter<P> profileConverter,
        required BodyTemperatureRecordListCsvConverter<N> btrlConverter,
        List<GenericTempcordDataConverter>? additionalConverter}) =>
    TempcordDataParser._(_ConverterSet()
      ..add(profileConverter)
      ..add(btrlConverter)
      ..addAll(additionalConverter ?? <GenericTempcordDataConverter>[]));