65 lines
1.1 KiB
Dart
65 lines
1.1 KiB
Dart
import 'dart:async';
|
|
|
|
import 'package:event_bus/event_bus.dart';
|
|
import 'package:tencent_cloud_chat_uikit/tencent_cloud_chat_uikit.dart';
|
|
|
|
class EventBusManager {
|
|
|
|
static EventBus? _eventBus;
|
|
|
|
static EventBus get eventBus {
|
|
if (_eventBus == null) {
|
|
_eventBus = EventBus();
|
|
}
|
|
return _eventBus!;
|
|
}
|
|
|
|
static void fire(dynamic event) {
|
|
eventBus.fire(event);
|
|
}
|
|
|
|
static Stream<T> on<T>() {
|
|
return eventBus.on<T>();
|
|
}
|
|
|
|
static void cancelSubscription(StreamSubscription subscription) {
|
|
subscription.cancel();
|
|
}
|
|
}
|
|
|
|
|
|
class CommentVipEvent {
|
|
int vip = 0;
|
|
|
|
CommentVipEvent(this.vip);
|
|
}
|
|
|
|
class SendCoustomMessage {
|
|
|
|
V2TimValueCallback<V2TimMsgCreateInfoResult>? createCustomMessageRes = null;
|
|
|
|
SendCoustomMessage(this.createCustomMessageRes);
|
|
}
|
|
|
|
class CommentBlackEvent {
|
|
String userId = "";
|
|
bool isBlack = false;
|
|
CommentBlackEvent( {required this.userId,required this.isBlack });
|
|
}
|
|
class CommentBlackMoreEvent {
|
|
}
|
|
|
|
class CallRefreshCircle {
|
|
String circleId = "";
|
|
|
|
CallRefreshCircle(String id);
|
|
}
|
|
|
|
class ScrollToTop {
|
|
|
|
}
|
|
|
|
|
|
class RefreshUnread {
|
|
|
|
} |