The argument type 'Future<List<Account>>' can't be assigned to the parameter type 'Future<List<Account>>?'

Solution 1:

The only way your error message makes sense is if you have two different classes named Account in your project. Maybe one from the package and one you created yourself?

Anyway, to pick the correct one, just let the compiler decide that. Omit the explicit generic parameters for the FutureBuilder and it should pick up the correct one from it's parameters:

FutureBuilder(future: AccountService.retrieveAccounts(),),