BallotLines<TCandidate extends Comparable> constructor

BallotLines<TCandidate extends Comparable>(
  1. List<BallotLine<TCandidate>> _lines, {
  2. String candidateToText(
    1. TCandidate
    ) = _defaultCandidateText,
})

Implementation

BallotLines(
  this._lines, {
  this.candidateToText = _defaultCandidateText,
})  : countWidth = _longest(_lines.map((l) => l.count.toString())),
      candidateWidth =
          _longest(_lines.expand((l) => l.candidates).map(candidateToText));