Home > OS >  sorting map in flutter
sorting map in flutter

Time:05-09

I am trying to sort the below map into key:value format displayed on a card widget. The entire numeric key should be sorted in ascending order and all the alpha keys should be sorted in ASCII, ascending order.

Dictionary = {'34': 'thirty-four', '90': 'ninety',
'91': 'ninety-one''21': 'twenty-one',
'61': 'sixty-one', '9': 'nine',
'2': 'two', '6': 'six', '3': 'three',
'8': 'eight', '80': 'eighty', '81': 'eighty-one',
'Ninety-Nine': '99', 'nine-hundred': '900'}

I would appreciate help on the best way to approach this problem

  • Related