By Developers, For Developers

Historical errata for Programming Flutter

PDF PgPaper PgTypeDescriptionFixed onComments
21TYPO

Below section is on Flutter Plugin installation for VSCode but mentions Android Studio —

VSCode

To install the Flutter plugin for Android Studio you need to open Visual Studio
Code, then use the keyboard shortcut Ctrl-Shift -P to open the command palette,
then type “Install extensions” and press Enter .
On the panel that opens up on the left, type Flutter and press Enter .
Click the Install button in the Flutter entry in the list, this will install both
the Flutter and the Dart plugins.

2019-08-13Actually fixed in Beta 2
AllOK

Just downloaded b2_0 and found that (at least in Mac Preview) none of the TOC and bottom-of-page links are live. All of the footnotes I tried are live, but code links and in-line links to other chapters are dead.

2019-08-25Try using some other software to read the book, all links seem to be working on my machine. \nFeel free to file another erratum or contact me directly at carmine@carminezacc.com if it doesn't work even with other software or if other books work with the software you tried
295TYPO

Second bullet point on the page:
quotes inside the string ’“He said: ”Hi!“” are not escaped.

Note that there seems to be a spurious single curly quote before the first double quote as well.

2019-08-18Thank you, I made a mess of the quotes to enclose that code section so the backslashes aren't shown in the book, that also explains that single curly quote you mentioned.
3TYPO

The title of the second code snippet is ‘firstapp/lib/starting.dart’.
The text above says to ‘create a file called main.dart’, and also ‘Inside main.dart, write the following’.

Note that on page 7 the code snippet als has the title ‘firstapp/lib/starting.dart’.

2019-08-18Not the only instance. I didn't think it would matter, but if you're picking up on it I need to fix it and move the starting apps to a separate folder. Will be done for the next beta, thank you for the feedback again!
9TYPO

First line of third paragraph:
Because of this, they are more complex that stateless widgets
should be
Because of this, they are more complex than stateless widgets

2019-08-18
34TYPO

Second line of second paragraph:
and, after that, indented inside, it
should IMO be
and, after that, indented inside it,

2019-08-18
31TYPO

Second line of the code snippet at the top

width: 50.0,
should be
width: 200.0,

since the text on the previous page mentions ‘limited to a 200x50 rectange’

2019-08-18
35TYPO

First link on the page
Asynchronous code in Dart: the, on page 305
should be:
Asynchronous code in Dart: the dart:async library, on page 305

2019-08-18
30OK

Can you explain the need for the Padding widget, in light of the Container widget also having a ‘padding’ and ‘child’ option. Flutter documentation states that Container makes use of the Padding widget via composition. So for beginners it’s not really necessary to think up different use cases when to use Padding and when to use Container: it’s simpler to always use a Container as a rule of thumb.

2019-08-25I always find it more intuitive to just use Padding whenever I only need padding (one unnecessary layer of abstraction removed), and that's also reflected by the examples in the book (I'm quite certain I used the Padding widget several times). It's also used often enough I don't feel like it should be left out and it's very easy to remember, unlike some other widgets I left out. It's like using a dedicated credit card instead of using the credit card function in a multifunctional bank card: it's just as easy, a bit more intuitive (for me at least) and it has a place in the world just like I believe the Padding widget has a place in this book because it's used often. Also, I'm not hiding the fact that the Container can be used to add padding: it's mentioned when I talk about the Container so, in the end, it's up to the reader to choose which one to use. Thank you very much for your comprehensive and useful feedback again!
42OK

Chapter 2 is very, very, long. In particular the ‘Vertical Layout’ section.
How about splitting the chapter into two, e.g. ‘Laying Out More Widgets’ and ‘Laying Out Even More Widgets’, or ‘Laying Out in 1 dimensions’ and ‘Laying Out in more dimensions’?

2019-08-25We decided against it, we believe the chapter is good as it is now and splitting it isn't necessary, thank you anyway for the suggestion.
35TYPO

On is the image,
should be
One is the image,

2019-08-18
24TYPO

The full main.dart code starting at the bottom of the page is missing

import ‘OurButton.dart’;

2019-10-11That's very strange. I wonder why it isn't there given that I upload to the repository the files that generate the app in the screenshots and the only things I add is what is needed to integrate them with the book. I fixed it, anyways.
30TYPO

In the section ‘The Container and the BoxDecoration’ the first bullet:
‘we can choose to costrain’
should be
‘we can choose to constrain’

2019-10-11
31TYPO

Third bullet
‘which are used specify’
should be
‘which are used to specify’

2019-10-11
35TYPO

In the second paragraph of the section ‘Displaying Images’:
‘On is the Image’
should be
‘One is the Image’

and in the last paragraph on the page:
‘an URL’
should be
‘a URL’?

2019-10-11
38TYPO

‘Setting an height higher or lower than the
height the image will end up being normally’
should be:
‘Setting an height higher or lower than the
height of the view’

and:
‘if yyou’ should be ‘if you’

2019-10-11In the case of the first one, I wasn't wrong: I meant what I wrote and I now added a clarifying sentence so that it's not misunderstood by anyone else. I fixed the second one.
34-35SUGGEST

I would find it more logical if you explained how to create an AssetBundle right after you list the various methods to load data from an AssetBundle. Now there is the small section ‘AssetBundles and the rootBundle’ in between. Maybe the book can also explain when or why to use AssetBundle.loadString() vs. rootBundle.loadString().

2019-10-11You're right. I haven't really explained what an AssetBundle (other than the rootBundle) is used for. I will fix it ASAP.
anySUGGEST

First of all, thanks for your book. I am enjoying it and learning.

On my iOS devices, the code formatting is not monospaced and the indents are lost, making it hard to read.

The Kindle app on MacOS seems however to not exhibit this rendering problem.

I read a lot on the train using my portable device and this improvement would be very welcome.

2020-01-25This is something I can't do anything to fix, I've let the editor know about it. I hope there's someone who can fix it at PragProg and it's not something just Apple can fix and that you're enjoying the book nonetheless.
59ERROR

The link in footnote 3 results in a 404 - Page Not Found

2020-01-22I've tried that link and it works.
71TYPO

The sentence was apparently in the midst of being reworked:

because it’s not worth it to generate real pseudo-random numbers isn’t worth it and would have a less realistic result):

2020-01-22
90TYPO

On the left of the numbers

should read

To the right of the numbers

2020-01-22
91SUGGEST

The following text is awkward and possibly grammatically incorrect:
What we have done is simply displaying …

Suggestion:

What we have done is to simply display …

2020-01-02
92OK

Similarly, the first Row widget (the one containing the delete buttons, shown in the code on page 86) will have to be replaced with:
Expanded(
flex: 1,

flex: 1 should be flex: 3

2020-02-05I don't agree with that, they should be a quarter of the height of the next row widget, it's correct as it is in the book.
194TYPO

section title reads:

“Adding the AppBar Action to the Comic Path”

should be:

“Adding the AppBar Action to the Comic Page”

192ERROR

source code for

void _addToStarred(int num) { … }

contains reference to variable: docsDir and isStarred

it is not clear where docsDir belongs as the _ComicPageState class is shown as:

class _ComicPageState extends State {
@override
Widget build(BuildContext context) {
// return Scaffold(…)
}
}

on page 193 it is stated that isStarred must be added to the _ComicPageState class. But no mention of docsDir is made.

141SUGGEST

chapter 5 source code includes a file called:
dialog.dart
it seems to have been meant to retry/cancel a network request if no connection is available. but there is no mention of this file or what it is supposed to do anywhere in the chapter 5 text.

242TYPO

Under “Authentication” section. First sentence reads:

“Authentication requires its own firebase_auth package 4 and can be configured
in Flutter’s console by going to Develop -> Authentication -> Sign-in method.”

it should be:

“Authentication requires its own firebase_auth package 4 and can be configured
in Firebase’s console by going to Develop -> Authentication -> Sign-in method.”

Categories: