Метод followedBy
-
Iterable<
E> other
override
Возвращает ленивое конкатенацию этого итерируемого объекта и other.
Полученный итерируемый объект будет предоставлять те же элементы, что и этот итерируемый объект, а затем – элементы other, в том же порядке, что и в исходных итерируемых объектах.
Пример:
var planets = <String>['Earth', 'Jupiter']; var updated = planets.followedBy(['Mars', 'Venus']); print(updated); // (Earth, Jupiter, Mars, Venus)
Реализация
Iterable<E> followedBy(Iterable<E> other) {
// Type workaround because IterableMixin<E> doesn't promote
// to EfficientLengthIterable<E>.
Iterable<E> self = this;
if (self is EfficientLengthIterable<E>) {
return FollowedByIterable<E>.firstEfficient(self, other);
}
return FollowedByIterable<E>(this, other);
}
© 2012 the Dart project authors
Licensed under the BSD 3-Clause "New" or "Revised" License.
https://api.dart.dev/stable/2.18.5/dart-collection/IterableMixin/followedBy.html