Errata for Dart Apprentice: Beyond the Basics 1st Edition

Creating this topic to catch any typos and bugs in the 1st Edition of Dart Apprentice: Beyond the Basics.

PDF, Page 9 — looks like some text at the very bottom has been truncated:

PDF, Page 23, Paragraph Matching the Beginning and End, first example:

final numbers = RegExp('r[0-9]');

The r symbol should be in front of the string:

final numbers = RegExp(r'[0-9]');

2 Likes

PDF, Page 57, Paragraph Calling Super Last in an Initializer List, the example:

class SomeChild extends SomeParent {
  SomeChild(double height, double width, String name)
      : _width = width, // initializer
      : _height = height, // initializer
        super(name); // super

  final double _width;
  final double _height;
}

Line 4:
: _height = height, // initializer

Looks like we don’t need that colon before the _height variable since it breaks the initializer list syntaxis.

1 Like

PDF, Page 72, Paragraph Separating Business Logic From Infrastructure, the image with the scheme has left side blue circle block named Business Login — I think it should be Business Logic instead:

1 Like

@eshfield Thank you for all of your error reports! I didn’t have my notifications set up correctly for this book, so I am just seeing your posts today.

For the truncated text in the How to Read This Book section, I’m not sure what the problem is. My PDF version isn’t truncated. Maybe @jellodiil can give some help.

1 Like

Yes, thank you! Updated.

1 Like

That’s right. Thank you. I’ve updated the chapter text for the online version.

@eshfield I can’t make more than three consecutive replies, so I’m posting the following as an edit to my previous reply:

You’re right again. Thank you. I’m requesting an updated image from the illustration team.

1 Like

@suragch I’m glad that my meticulousness is useful here :slight_smile:
I have a little bit of another observations that I couldn’t post earlier due the three consecutive replies limit.

  1. PDF, Page 96, Paragraph Storing a Tree in a List
    Looks like the figure with the tree has element #3 (value of 5) and #4 (value of 0) swapped:

Another tree figures in this chapter have the correct order:

  1. PDF, Page 129
    This is not the Continue button highlighted at the image:

  1. PDF, Page 135 and 136

Now, add the following validation method below main :

Add a few more validation methods below main :

Is it correct to name that functions as methods? This is just a regular functions, not in the class definition scope.

  1. PDF, Page 167

Looks like the error message for the SocketException doesn’t have the prefix SocketException: — only Failed host lookup: 'jsonplaceholder.typicode.com' (using Dart 2.19)

Page 175, the last line before Using a Stream paragraph:

The chapter will finish by teaching you how to make your own steams

Steampunk is fun :slight_smile:

PDF, Page 187, Writing the Code:

I think it would be worth to mention that you need to ensure you have import 'dart:async'; line to have the ability to use the StreamController at this example

I’m glad that my meticulousness is useful here

Very useful!

  1. PDF, Page 96, Paragraph Storing a Tree in a List
    Looks like the figure with the tree has element #3 (value of 5) and #4 (value of 0) swapped:

Yes, thank you. I’ve requested an updated image from the illustrations team.

  1. PDF, Page 129
    This is not the Continue button highlighted at the image:

The image is correct in my PDF version and in the online version and in the current book repo and the recent repo history, so I’m not sure why your PDF shows the wrong image. Did you download the PDF from the Kodeco website? What renderer are you using to view the PDF content?

Is it correct to name that functions as methods? This is just a regular functions, not in the class definition scope.

Good point. I’ve updated the wording here and several other places in the article.

Looks like the error message for the SocketException doesn’t have the prefix SocketException: — only Failed host lookup: 'jsonplaceholder.typicode.com' (using Dart 2.19)

This is also true for Dart 2.18 (which is what the book should be using). I’ve updated the error message.

1 Like

My PDF version is from Kodeco website and I just open it in Chrome browser to read. Looks like I have some local problems on my machine with PDF rendering (recalling my first issue with truncated text at the beginning of the book) — sorry for that false alarms.

1 Like

Steampunk is fun :slight_smile:

Haha, I don’t know much about that, but streams are too. I’ll make the update. Thanks.