Sort<T extends Logic> constructor

Sort<T extends Logic>({
  1. required Iterable<T> toSort,
  2. Logic isLessThan(
    1. T a,
    2. T b
    )?,
  3. bool isAscending = true,
  4. String name = 'sort',
  5. bool reserveName = false,
  6. bool reserveDefinitionName = false,
  7. String? definitionName,
})

Sort algorithm MUST have a list of toSort, direction of sort isAscending and a name for the sorting module.

Implementation

Sort(
    {required this.toSort,
    Logic Function(T a, T b)? isLessThan,
    this.isAscending = true,
    super.name = 'sort',
    super.reserveName,
    super.reserveDefinitionName,
    String? definitionName})
    : _isLessThan = isLessThan,
      super(definitionName: definitionName ?? 'Sort_W${toSort.length}');