Tracker<TrackableType extends Trackable> constructor

Tracker<TrackableType extends Trackable>(
  1. String name,
  2. List<TrackerField> fields,
  3. {String spacer = ' | ',
  4. String separator = '-',
  5. String overflow = '*',
  6. String? outputFolder,
  7. bool dumpTable = true,
  8. bool dumpJson = true}
)

Constructs a Tracker named name with the provided fields.

In the table view, the spacer is used to separate columns, the separator is used to separate the headers from the data, and the overflow is used to show that a value is exceeding the width of the column. Tables will only dump if dumpTable is true.

JSON files will only dump if dumpJson is true.

All outputs are dumped to outputFolder if it is provided, otherwise they are dumepd in the current working directory.

Implementation

Tracker(this.name, List<TrackerField> fields,
    {String spacer = ' | ',
    String separator = '-',
    String overflow = '*',
    this.outputFolder,
    this.dumpTable = true,
    this.dumpJson = true}) {
  var fileNameStart = name;
  if (outputFolder != null) {
    fileNameStart = '${outputFolder!}/$fileNameStart';
  }
  _dumpers = [
    if (dumpJson) _JsonDumper<TrackableType>(jsonFileName, fields),
    if (dumpTable)
      _TableDumper<TrackableType>(tableFileName, fields,
          spacer: spacer, separator: separator, overflow: overflow)
  ];
}