MockStreamHandler class abstract

A mock stream handler for an EventChannel that mimics the native StreamHandler API.

The onListen callback is provided a MockStreamHandlerEventSink with the following API:

Constructors

MockStreamHandler()
Create a new MockStreamHandler.
MockStreamHandler.inline({required MockStreamHandlerOnListenCallback onListen, MockStreamHandlerOnCancelCallback? onCancel})
Create a new inline MockStreamHandler with the given onListen and onCancel handlers.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onCancel(Object? arguments) → void
Handler for the cancel event.
onListen(Object? arguments, MockStreamHandlerEventSink events) → void
Handler for the listen event.
toString() String
A string representation of this object.
inherited

Operators

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