fromIterable function Null safety

TimedGenerator fromIterable(
  1. Iterable<DateTime> iterable
)

Implementation

TimedGenerator fromIterable(Iterable<DateTime> iterable) {
  final iterator = iterable.iterator;
  return (DateTime now) {
    return iterator.moveNext() ? iterator.current : null;
  };
}