checkEventWasReceived method
Returns true if underlying events list contains given event name
event
- event type to check
count
- optional count of events that must have been received
Implementation
@visibleForTesting
bool checkEventWasReceived(Type event, {int? count}) {
if (count == null) {
return _receivedEvents.contains(event);
}
return _receivedEvents.whereType<Type>().length == count;
}