sortNumeric 

When sorting an array consisting of strings, it sorts first by the numbers contained in the strings, not by their names. For example, given the array ['1-a', '100-a', '10-a', '2-a'], it returns ['1-a', '2-a', '10-a', '100-a'] with the smaller numbers at the front.
Parameters
| Name | Type | Required | Default |
|---|---|---|---|
array | string[] | ● | – |
descending![]() named | boolean | – | false |

named parameters are passed as named parameters in Dart and keyword arguments in Python.
Returns
string[]
Examples
javascript
sortNumeric(['a1a', 'b2a', 'aa1a', '1', 'a11a', 'a3a', 'a2a', '1a']);
// Returns ['1', '1a', 'a1a', 'a2a', 'a3a', 'a11a', 'aa1a', 'b2a']python
sortNumeric(['a1a', 'b2a', 'aa1a', '1', 'a11a', 'a3a', 'a2a', '1a'])
# Returns ['1', '1a', 'a1a', 'a2a', 'a3a', 'a11a', 'aa1a', 'b2a']