How can I sort a list of strings in Dart?

后端 未结 5 2000
萌比男神i
萌比男神i 2020-12-03 06:18

I see in the API docs there is a sort() method on List, but I\'m not clear what it needs for a parameter. The current need is for a very simple st

5条回答
  •  不知归路
    2020-12-03 07:03

    How I have solved this problem.

    
      List _dataSavingListProducts = [];
      List _dataSavingListFavoritesProducts = [];
    
      void _orderDataSavingLists() {
        _dataSavingListProducts.toList().reversed;
        _dataSavingListFavoritesProducts.toList().reversed;
      }
    
    
    

提交回复
热议问题