Answers for "reverse a list in flutter"

2

how to reverse a list in dart

void main(){
    //a list
    var myList = [24, 56, 84, 92];
     
    //intialize a new list from iterable to the items of reversed order
    var reversedList = new List.from(myList.reversed);
     
    print(reversedList);
}
Posted by: Guest on April-24-2021
3

flutter reverse list

List<String> reversedAnimals = animals.reversed.toList();
Posted by: Guest on August-03-2020
3

dart reverse list

x.reversed.toList()
Posted by: Guest on June-29-2020
1

dart reverse list

print([1, 2, 3].reversed.toList())
// prints: [3, 2, 1]
Posted by: Guest on August-30-2021

Browse Popular Code Answers by Language