getUnreadConversationsCountStream method
Implementation
@override
Stream<int> getUnreadConversationsCountStream() {
const MethodChannel("carrotquest_sdk").setMethodCallHandler((call) async {
if (call.method == "unreadConversationsCount") {
try {
int count = int.parse(call.arguments.toString());
_unreadConversationsCountStreamController.add(count);
} catch (e) {
_unreadConversationsCountStreamController.addError(e);
}
}
});
return _unreadConversationsCountStreamController.stream.asBroadcastStream();
}