회원목록
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
import 'dart:async';
|
||||
|
||||
class EventBus {
|
||||
static final EventBus _instance = EventBus._internal();
|
||||
|
||||
factory EventBus() => _instance;
|
||||
|
||||
EventBus._internal();
|
||||
|
||||
final _streamController = StreamController.broadcast();
|
||||
|
||||
Stream get stream => _streamController.stream;
|
||||
|
||||
void fire(dynamic event) {
|
||||
_streamController.add(event);
|
||||
}
|
||||
|
||||
void dispose() {
|
||||
_streamController.close();
|
||||
}
|
||||
}
|
||||
|
||||
// 이벤트 클래스들
|
||||
class ClubChangedEvent {
|
||||
final String clubId;
|
||||
|
||||
ClubChangedEvent(this.clubId);
|
||||
}
|
||||
Reference in New Issue
Block a user