
In this guide, we will discuss the List.last Method in Dart Programming Language. Returns the last element in the list.
Syntax
List.last
Example
void main() { var lst = new List(); lst.add(12); lst.add(13); print("The last element of the list is: ${lst.last}"); }
It will produce the following output −
The last element of the list is: 13
Next Topic : Click Here
Pingback: Dart Programming - List.length Method | Adglob Infosystem Pvt Ltd
Pingback: Dart Programming - Lists | Adglob Infosystem Pvt Ltd