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
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.
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:
Minor thing at âChapter 4. ValidationâŠâ (may be it could be covered by new âNote: âŠâ explanation )
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
âpasswordTextFieldInvalidErrorMessageâ: âPassword must be in range of 5âŠ120 characters long.â,
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
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,