sublist()

Returns a new list containing the elements between start and end.

final myList = <int>[0, 1, 2, 3, 4, 5];
print(myList.sublist(2, 4)); // [2, 3]
print(myList.sublist(2)); // [2, 3, 4, 5]
print(myList.sublist(3, 3)); 

shuffle()

Shuffles the elements of this list randomly.

final myList = <int>[0, 1, 2, 3, 4, 5];
numbers.shuffle();
print(numbers); // [3, 1, 5, 2, 0, 4] OR some other random result.

whereType()

Returns a lazy Iterable with all elements that have the specified type.

final mixList = [1, 'a', 2, 'b', 3, 'c'];
print(mixList.whereType<int>()); // (1, 2, 3)
print(mixList.whereType<String>()); // (a, b, c)

reduce()

Reduces a collection to a single value by iteratively combining elements of the collection using the provided function.

final numbers = <int>[1, 2, 3, 4, 5];
final sum = numbers.reduce((value, element) => value + element);
print(sum); // 15
 
final max = numbers.reduce((i, j) => i > j ? i : j);
print(max); // 5

fold()

Reduces a collection to a single value by iteratively combining each element of the collection with an existing value.

final res = numbers.fold(5, (value, element) => value + element);
print(res); // 20

firstWhere()

Returns the first element from the list when the given condition is satisfied.

final stringNumbers = ['One', 'Two', 'Three', 'Four'];
final res = stringNumbers.firstWhere((element) => element.length > 4);
print(res); // Three