last
返回列表中的最后一个元素。
语法 (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}");
}
它将产生以下output -
The last element of the list is: 13
返回列表中的最后一个元素。
List.last
void main() {
var lst = new List();
lst.add(12);
lst.add(13);
print("The last element of the list is: ${lst.last}");
}
它将产生以下output -
The last element of the list is: 13