Closed dipu0 closed 5 months ago
Hi @dipu0 👋 Can you share a link to a minimal reproduction sample? I’m guessing you’re using a mock bloc and not stubbing updateItem but if your goal is to test the bloc you shouldn’t be mocking it in the first place. Hope that helps!
Describe the bug When utilizing the bloc test to act an event that triggers the execution of the following code snippet:
bool? isDone = await repository!.updateItem(newList);
where the updateItem function is defined as:
An exception is thrown during execution, specifically: "type 'Null' is not a subtype of type 'Future<bool?>'".
To Reproduce
Expected behavior The updateItem function should handle the provided list (newList), perform its operations, and return a Future<bool?> based on the operation's success or failure.
Actual Behavior The code execution results in an exception: "type 'Null' is not a subtype of type 'Future<bool?>'", which is unexpected and indicates an issue within the function or its invocation.