List関連の関数
https://api.dart.dev/stable/2.7.0/dart-core/List-class.html
Array.prototype.slice()
start-endの配列を抽出
var testList = [1, 2, 3];
testList.sublist(0,2); // => [1, 2]
Array.prototype.filter()
条件にあうものを抽出
var testList = [1, 2, 3];
testList.where((int item) => item >= 2).toList(); // => [2, 3]
Array.prototype.map()
mapで値を変換して返す
var testList = [1, 2, 3];
testList.map((int item) => Text(item)).toList(); // => [Text("2"), Text("3")]
Array.prototype.every()
全ての条件がtrue であれば true
var testList = [1, 2, 3];
testList.every((int item) => item >= 0); // => true
testList.every((int item) => item >= 2); // => false
Array.prototype.some()
1つの条件がtrueであれば true
var testList = [1, 2, 3];
testList.any((item) => item >= 2); // => true
testList.any((item) => item >= 4); // => false