zacktu (1) [Avatar] Offline
I am working through the DartExpense code in chapter 10. I think that I've eliminated all errors due to the conversion to version 1. Chapter 10 is about building a web app, but the execution error is in some of the support code.

Here are the error statements:

Exception: type '() => dynamic' is not a subtype of type 'GetExpenses' of 'dataSource'.
loadExpenses (
MockData.MockData (
main (

The call sequence is
DartExpense.dart: var dataSource = new MockData();

mock_data.dart: var tmpExpenses = loadExpenses(getMockExpenses); // passing in the function in library scope

data_access.dart: Collection<Expense> loadExpenses(GetExpenses dataSource) {

The use of Collection as a class is flagged in the declaration above. I changed Collection to List, but I still get the same three error messages.

What to do now?