tdd 진행
This commit is contained in:
@@ -15,6 +15,11 @@ class EventBus {
|
||||
_streamController.add(event);
|
||||
}
|
||||
|
||||
// 특정 타입의 이벤트를 구독하는 메서드
|
||||
Stream<T> on<T>() {
|
||||
return stream.where((event) => event is T).cast<T>();
|
||||
}
|
||||
|
||||
void dispose() {
|
||||
_streamController.close();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user