OffsetIteratorController<T> class

OffsetIteratorController implements sink behaviour and wraps an OffsetIterator.

Implemented types

Constructors

OffsetIteratorController({String name = 'OffsetIteratorController', bool closeOnError = true, OffsetIteratorControllerTransform<T>? transform, SeedCallback<T>? seed, int retention = 0})

Properties

closeOnError bool
If true, when addError is called, the controller will be closed.
final
drainableSink DrainableSink<T>
Expose the DrainableSink behaviour, which provides a smaller API surface.
no setter
hashCode int
The hash code for this object.
no setterinherited
iterator OffsetIterator
The OffsetIterator that is being controlled.
latefinal
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sink AwaitableSink<T>
Expose the AwaitableSink behaviour, which provides a smaller API surface.
no setter
state OffsetIteratorControllerState
The internal state of the controller.
no setter

Methods

add(T data) FutureOr<void>
Add data to the sink.
override
addError(Object error, [StackTrace? stackTrace]) FutureOr<void>
Add an error to the sink.
override
close([Option<T> data = const None()]) FutureOr<void>
Close the sink
override
drain(Future<void> task(AwaitableSink<T> sink)) Future<void>
Start draining the sink.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited