From 214867a8d82e1e7e7d320fbf6aaf93d47c204764 Mon Sep 17 00:00:00 2001 From: Luis Burgos Date: Thu, 4 Aug 2022 22:34:47 -0500 Subject: [PATCH] feat: add event bus visible for testing properties --- lib/infra/typed_event_bus.dart | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/infra/typed_event_bus.dart b/lib/infra/typed_event_bus.dart index d1453dd..45f6e79 100644 --- a/lib/infra/typed_event_bus.dart +++ b/lib/infra/typed_event_bus.dart @@ -1,8 +1,17 @@ +import 'dart:async'; + import 'package:buzz/buzz.dart'; import 'package:buzz/utils/subtype_checker.dart'; import 'package:event_bus/event_bus.dart'; +import 'package:flutter/foundation.dart'; abstract class TypedEventBus { + @visibleForTesting + StreamController get eventBusStreamController => _eventBus.streamController; + + @visibleForTesting + Stream get eventBusStream => eventBusStreamController.stream; + final _eventBus = EventBus(); bool isTypeSupported() {