Dart编程实例 - 泛型列表实例
void main() {
List <String> logTypes = new List <String>();
logTypes.add(1);
logTypes.add("ERROR");
logTypes.add("INFO");
//iterating across list
for (String type in logTypes) {
print(type);
}
}
void main() {
List <String> logTypes = new List <String>();
logTypes.add(1);
logTypes.add("ERROR");
logTypes.add("INFO");
//iterating across list
for (String type in logTypes) {
print(type);
}
}