You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
but at line when(await mockMyDatabaseWrapper.insertFolder(testFolder)).thenReturn(true); I am getting an error: The following _TypeError was thrown running a test: type 'Null' is not a subtype of type 'Future<bool>'
Can anyone please tell me what I am doing wrong here?
The text was updated successfully, but these errors were encountered:
I am trying to mock a static method from the class MyDatabase which returns Future. So I created MockMyDatabaseWrapper as:
and in test I am mocking it as:
but at line
when(await mockMyDatabaseWrapper.insertFolder(testFolder)).thenReturn(true);
I am getting an error:The following _TypeError was thrown running a test: type 'Null' is not a subtype of type 'Future<bool>'
Can anyone please tell me what I am doing wrong here?
The text was updated successfully, but these errors were encountered: