Dart Programming - List.reversed Method


Advertisements

Returns an iterable object containing the list values in the reverse order.

Syntax

List.reversed 

Example

void main() { 
   var lst = new List(); 
   lst.add(12); 
   lst.add(13); 
   print("The list values in reverse order: ${lst.reversed}"); 
}  

It will produce the following output

The list values in reverse order: (13, 12) 
dart_programming_lists.htm
Advertisements