Errata for Real-World Flutter by Tutorials 1st Edition

Creating this topic to catch any typos and bugs in the 1st Edition of Real-World Flutter by Tutorials.

The file quote_sliver_grid.dart in rwf-materials/07-routing-and-navigating/projects/starter/packages/features/quote_list/lib/src uses a PagedStaggeredSliverGrid. This widget was recently renamed to MasonryGridView by the author of both the book and the package.

I solved the build error by changing the pubspec dependency to the latest commit where the PagedStaggeredSliverGrid was present.

I found more minor issues, I will post them here.

Thanks for the great book!!! It’s the perfect guide I was looking for!

Kind regards,
Carin

infinite_scroll_pagination:
    git:
      url: https://github.com/EdsonBueno/infinite_scroll_pagination.git
      ref: 670dfebcc104d0a1c376fc982d258ce2b24e2a1b

Hey @canaria,
I can’t thank you enough for catching this.
Thanks to you, this is now fixed in our materials repo (editions/1.0 branch).
I’m glad to hear you’re liking the book so far, let me know if you need any help.

In the Key Points of Chapter 3 “Managing State With Cubits & the Bloc Library” the example for accessing a cubit wrong:

You get an instance of your Cubit to call functions on it by calling context.read<context.read<YourCubitType>()>.

Congratulations on this flutter book that is not aimed at beginners but covers advanced topics.

Regards
Alfred

1 Like

A little typo “expending” in:
„Apply those two additional attributes and hot reload the app. Navigate to Simple Expanded Elevated Button located in the Buttons section by expending the side drawer hidden in the menu.“

And here option should be options:
„In the code above, using the option parameter, you can specify
 “

In Chapter 10 this reference is not correct:
“Therefore, check the key concepts and theory behind InheritedWidget in the previous chapter, Chapter 9, “Internationalizing & Localizing”

There is nothing said about InheritedWidget in chapter 9.

Thank you for reporting these. Very helpful. We are fixing them now. Thanks again.

Great book - I am enjoying it much.

A few nits in chapter 5:

in one place it says that we should remember that QuoteListUsernameObtained is called when the list page is first loaded. It is clear that the event is immediately subscribed to in the constructor
 it was not clear to me that the initial subscription would somehow fire that event and load the page.

It’s not particularly clear that the transformer config is put there to intercept future events. I’ve gathered that via experimentation - but I’m not really sure it’s clear in the text. small thing: in this same section the annotation of the code is 1, 1, 2 instead of 1, 2, 3

a sentence reads that the rest of the event handlers are the same as _handleQuoteListOpened
 but there is no event _handleQuoteListOpened event or handler. I assume what it means here is _handleQuoteListUsernameObtained and that the method name was changed after the original text was written.

I do not mean to be overly critical because I really am enjoying the book
 but I think that while the Cubit chapters were painstakingly clear and wonderful to read - the Bloc chapter is not as deeply clear. I am sorting it - but I’m having to work quite a bit harder to bridge the gap between the text and the code.

@ebueno @vpalcar please see comments above

Hi, minor (but key stone) missing piece in re:

You could just go ahead and manually copy-paste the files to their respective paths in all the other projects, but you’re talking about at least two projects for each chapter in the book. The good news is you don’t have to do that manually; your project contains a shell script that automates everything for you.If you’re on macOS or Linux, run the script by re-opening the Terminal tab in your IDE. From there, execute the following command: sh propagate-config-files.sh (page 48)

this script copies GoogleService-Info.plist to projects folder but at least for iOS it also should be added to project via Xcode, otherwise build fail with Firebase error.

page 111 (very top) and web version of the book has it as well:


the bulk of the struggle comes from for screens:

should it be:


the bulk of the struggle comes from form screens:

:thinking:

Minor thing at “Chapter 4. Validation
” (may be it could be covered by new “Note: 
” explanation :thinking:)

Error message is wrong for case when password contains more than 120 symbols:

“passwordTextFieldInvalidErrorMessage”: “Password must be at least five characters long.”,

Or error message should cover both cases if we aren’t split these to “min” and “max” cases/errors :thinking:

“passwordTextFieldInvalidErrorMessage”: “Password must be in range of 5
120 characters long.”,

1 Like

Page 33 of the PDF version:

That’s a lot to learn, so get ready to dive right in! While going through this chapter, you’ll work on the starter project from this chapter’s assets folder.

Screenshot:

I guess you mean the projects folder since the assets folder doesn’t have so much:

P. S. I see the same issue in other chapters too

1 Like

Page 87−88 of the PDF version of the book, in the Chapter 4 take a look at the line submissionStatus: submissionStatus, I marked with the comment below in the end of the quote:

  SignInState copyWith({
    Email? email,
    Password? password,
    SubmissionStatus? submissionStatus,
  }) {
    return SignInState(
      email: email ?? this.email,
      password: password ?? this.password,
      submissionStatus: submissionStatus, // ← this one
    );
  }

This line should be:

submissionStatus: submissionStatus ?? this.submissionStatus,
1 Like