void main() {
var numbers = [5, 10, -4, 27, -8, 6, -2];
print("List 1");
numbers.where((number) => number > 0).skip(2).forEach((number) {
print(number);
});
print("List 2");
numbers.where((number) => number < 0).skip(1).forEach((number) {
print(number);
});
}
Output
List 1
27
6
List 2
-8
-2