Dart Flutter中拼接合并List 数组
Dart Flutter中如何拼接合并List呢?
Dart Flutter中可以通过 addAll() 拼接合并List 数组
Flutter中拼接List的Demo
List myList=['香蕉','苹果','西瓜'];
myList.addAll(['桃子','葡萄']); //拼接数组
print(myList);
输出:
['香蕉','苹果','西瓜','桃子','葡萄']
Dart Flutter中如何拼接合并List呢?
Dart Flutter中可以通过 addAll() 拼接合并List 数组
Flutter中拼接List的Demo
List myList=['香蕉','苹果','西瓜'];
myList.addAll(['桃子','葡萄']); //拼接数组
print(myList);
输出:
['香蕉','苹果','西瓜','桃子','葡萄']