Lists
// ordered group of objects
var list = [1, 2, 3];
print(list.length); //Print: 3
print(list[1]); //Print: 2
// other ways of list declaration and initializations
List<String> cities = <String>["New York", "Mumbai", "Tokyo"];
// To create a list thatâs a compile-time constant
const constantCities = const ["New York", "Mumbai", "Tokyo"];
Comments