import 'package:angel3_reactivex/subjects.dart'; import 'app_event.dart'; typedef Responder = void Function(T event); class Subscription { final BehaviorSubject _subject; Subscription(this._subject); void respond(Responder responder) { _subject.stream.where((event) => event is T).listen((event) { responder(event as T); }); } void dispose() { // Implement disposal logic if needed } }