toList方法
- {bool growable = true}
继承的
元素按迭代顺序排列。如果growable
为false,则列表长度固定。
示例
final planets = <int, String>{1: 'Mercury', 2: 'Venus', 3: 'Mars'};
final keysList = planets.keys.toList(growable: false); // [1, 2, 3]
final valuesList =
planets.values.toList(growable: false); // [Mercury, Venus, Mars]
实现
List<String> toList({bool growable = true}) =>
readClasses().toList(growable: growable);