followedBy static method

Sort followedBy(
  1. Iterable<Sort> sorts
)

Implementation

static Sort followedBy(Iterable<Sort> sorts) {
  final notEmpty =
      sorts.map((e) => e.reduce()).where((element) => !element.isEmpty);
  if (notEmpty.isEmpty) {
    return Sort.empty;
  } else if (notEmpty.length == 1) {
    return notEmpty.single;
  } else {
    return SortGroup(notEmpty.toList(growable: false));
  }
}