skip to Main Content

Title: TypeError in Flutter Test: Null is not a subtype of Future<String>

I'm writing a Flutter test where I'm trying to mock a method that calculates the BMI. Despite using when(...).thenReturn(...) to return a future value, I'm encountering the following error: ══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════ The following _TypeError…

VIEW QUESTION
Back To Top
Search