'Sorting data table on frequency in Flutter
I am new to flutter and I am in the learning phase. I am trying to fill my table from dummy data which is in another dart file. I am using flutter table rows and columns and I need help in sorting the most frequent data on the top row of the table based on its frequency. and how can I get dummy data which is in a separate dart file (dummy data) into my table row cells and how to sort it based on frequency?
List dummyData = [
{'fruit': 'Apples', 'frequency': 40},
{'fruit': 'Bananas', 'frequency': 35},
{'fruit': 'Grapes', 'frequency': 19},
{'fruit': 'Avocados', 'frequency': 16},
{'fruit': 'Pears', 'frequency': 10} ],
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
