sortedByStringSC method
- @Deprecated('Dart natively supports this function. Read DartDoc comment for more info.')
- String valueProvider(
- 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)));
}