sortedByStringSC method

  1. @Deprecated('Dart natively supports this function. Read DartDoc comment for more info.')
List<T> sortedByStringSC(
  1. String valueProvider(
    1. T element
    )
)

Deprecation hint: Read the migration guide for more details on migrating.

Returns this as sorted list using the valueProvider function that produces character values as base for sorting.

Example:

['c', 'b', 'a'].sortedByNum((c) => c); // ['a', 'b', 'c']
persons.sortedByString((p) => p.name); // sort persons alphabetically

Implementation

@Deprecated(
    'Dart natively supports this function. Read DartDoc comment for more info.')
List<T> sortedByStringSC(String Function(T element) valueProvider) {
  return sortedBySC((a, b) => valueProvider(a).compareTo(valueProvider(b)));
}