Bloc test fails to call an event if we use decodeImageFromList
We had to get the width and height of an image file
inside bloc for that we are using decodeImageFromList
but after that when we add
another event, that event doesn't execute while writing blocTest.
Dummy code:
Stream<OurState> _mapEventOne(File file) async* {
final decodedImage =
await decodeImageFromList(await pickedImage.readAsBytes());
/// This add event is not working
add(
EventTwo(
width: decodedImage.width,
height: decodedImage.height,
),
);
}