Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to reverse a List of type DataRow?

There is a List<DataRow> which I need to use in DataTable. If to reverse the list it produces the error:

The following _TypeError was thrown building Example(dirty):
type 'ReversedListIterable<DataRow>' is not a subtype of type 'List<DataRow>'

How to reverse a List of type DataRow?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

List<DataRow> listOfItems = [......];
List<DataRow> reversedListOfItems = listOfItems.reversed.toList()

this should do the trick

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading