Errata thread for Dart Apprentice, First Edition

Official errata thread for Dart Apprentice, First Edition!

1 Like

Hello, I think there is a typo in:

  • Before You Begin
    • iv. Introduction
      • 5th Paragraph: “There’s a good chance… fast native applications across mobile and desktop desktop platforms …embedded devices.”

Thank you for catching that. I’ve fixed it in the source text so it should get updated in the online version soon.

1 Like

I think that there is a small typo in the abstract classes section (Ch. 9):

“Don’t be put of by the word “abstract”. It’s no more difficult that the idea of an animal.”

“of” should be “off”

Thanks for the wonderful book

It’s amazing how many times I can proofread a chapter and still miss miss things like this! Thanks a lot for catching that and reporting it. I’ve corrected the source text now and hopefully the website should be updated soon.

Error in Chapter 6 - Factory constructors:

This is actually highly desireable in the case here because if 'id' or 'String' didn’t exist in the map, then your app would crash because you aren’t handling null.

'String' should be 'name' here, since we’re talking about Map membership.

Also, “desireable” should be “desirable,” which I discovered on my way to reporting the above error.

Thank you very much for catching those mistakes! I’ve updated the repo so the online version should get the changes soon.

I saw this in Chapter 3 - Casting down:

To get the this error

_CastError (type ‘int’ is not a subtype of type ‘double’ in type cast)

The expression 'num someNumber =3;' must be 'int someNumber =3;'

num someNumber = 3; also causes the error you quoted above. The reason is that while the compile-time type of someNumber is num, the run-time type is actually an int since 3 is an int.

It would probably be useful to clarify the explanation or change the example in the next edition of the book, though.

Chapter 4 - Control Flow.
Making Comparisions.
1st Para: "The int type is for whole numbers while the double type is for decimal numbers. "

The int type is for integer would be better as whole number just signifies 0 and positive natural number.

That’s a good point. I wasn’t thinking clearly about the mathematical meaning of whole numbers. I’ve made the change in the Editions 2.0 version that we’re working on now. Hopefully it should be published in August or September.

This topic was automatically closed after 4 hours. New replies are no longer allowed.