[ERROR: flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: type ‘List’ is not a subtype of type ‘FutureOr’
Error Solution: It looks like the error you’re encountering is due to a type mismatch between the return type of your getDoctors function and the expected return type when setting the doctors state. You’re trying to set a list (List) to the doctors state, but the function is declared to return a Future. To resolve this issue, you should update your getDoctors function to return a List instead of a Future. Here’s the modified code: Your code ought to function
Read more