Package io.flutter.plugin.common
Interface EventChannel.EventSink
- Enclosing class:
- EventChannel
public static interface EventChannel.EventSink
Event callback. Supports dual use: Producers of events to be sent to Flutter act as clients of
this interface for sending events. Consumers of events sent from Flutter implement this
interface for handling received events (the latter facility has not been implemented yet).
-
Method Summary
-
Method Details
-
success
Consumes a successful event.- Parameters:
event
- the event, possibly null.
-
error
Consumes an error event.- Parameters:
errorCode
- an error code String.errorMessage
- a human-readable error message String, possibly null.errorDetails
- error details, possibly null
-
endOfStream
void endOfStream()Consumes end of stream. Ensuing calls tosuccess(Object)
orerror(String, String, Object)
, if any, are ignored.
-