Iterator<T> constructor

Iterator<T>({
  1. Iterator? iterator,
  2. dynamic value,
  3. dynamic key,
  4. num? count,
  5. bool next()?,
  6. bool hasNext()?,
  7. dynamic first()?,
  8. void reset()?,
  9. bool any(
    1. bool (
      1. dynamic
      )
    )?,
  10. bool all(
    1. bool (
      1. dynamic
      )
    )?,
  11. void each(
    1. void (
      1. dynamic
      )
    )?,
  12. Iterator<S> map<S>(
    1. S (
      1. dynamic
      )
    )?,
  13. Iterator filter(
    1. bool (
      1. dynamic
      )
    )?,
})

Implementation

factory Iterator({
  _i3.Iterator<_i2.dynamic>? iterator,
  _i2.dynamic value,
  _i2.dynamic key,
  _i2.num? count,
  _i2.bool Function()? next,
  _i2.bool Function()? hasNext,
  _i2.dynamic Function()? first,
  void Function()? reset,
  _i2.bool Function(_i2.bool Function(_i2.dynamic))? any,
  _i2.bool Function(_i2.bool Function(_i2.dynamic))? all,
  void Function(void Function(_i2.dynamic))? each,
  _i3.Iterator<S> Function<S>(S Function(_i2.dynamic))? map,
  _i3.Iterator<_i2.dynamic> Function(_i2.bool Function(_i2.dynamic))? filter,
}) =>
    Iterator._(
      iterator: iterator ?? _i5.undefined,
      value: value,
      key: key,
      count: count,
      next: next == null ? null : _i4.allowInterop(next),
      hasNext: hasNext == null ? null : _i4.allowInterop(hasNext),
      first: first == null
          ? null
          : _i4.allowInterop(() => () => first() ?? _i5.undefined),
      reset: reset == null ? null : _i4.allowInterop(reset),
      any: any == null ? null : _i4.allowInterop(any),
      all: all == null ? null : _i4.allowInterop(all),
      each: each == null ? null : _i4.allowInterop(each),
      map: map == null ? null : _i4.allowInterop(map),
      filter: filter == null ? null : _i4.allowInterop(filter),
    );