5 #ifndef FLUTTER_SHELL_PLATFORM_COMMON_CLIENT_WRAPPER_INCLUDE_FLUTTER_EVENT_STREAM_HANDLER_FUNCTIONS_H_
6 #define FLUTTER_SHELL_PLATFORM_COMMON_CLIENT_WRAPPER_INCLUDE_FLUTTER_EVENT_STREAM_HANDLER_FUNCTIONS_H_
21 std::function<std::unique_ptr<StreamHandlerError<T>>(
23 std::unique_ptr<EventSink<T>>&& events)>;
27 std::function<std::unique_ptr<StreamHandlerError<T>>(
const T* arguments)>;
31 template <
typename T = EncodableValue>
52 return on_listen_(arguments, std::move(events));
55 auto error = std::make_unique<StreamHandlerError<T>>(
56 "error",
"No OnListen handler set",
nullptr);
57 return std::move(error);
62 const T* arguments)
override {
67 auto error = std::make_unique<StreamHandlerError<T>>(
68 "error",
"No OnCancel handler set",
nullptr);
69 return std::move(error);
78 #endif // FLUTTER_SHELL_PLATFORM_COMMON_CLIENT_WRAPPER_INCLUDE_FLUTTER_EVENT_STREAM_HANDLER_FUNCTIONS_H_