Errata for Flutter Apprentice 2nd Edition

Chapter 7, under “Handling Pop Events”.

There’s a typo in the first line. “Locate // TOOD:...” should be “Locate // TODO:...”.

In the same section, in the code snippet to be copied, there’s an footnote marker // 6 but no corresponding footnote.

8. Deep Links & Web URLs :arrow_right: Converting an AppLink to a URL string

The provided implementation of toLocation() doesn’t do logic defined in the explanation section.
I have tried to implement it as the explanation suggest:

switch (location) {
      case kLoginPath:
      case kOnboardingPath:
      case kProfilePath:
        return location;
      case kHomePath:
        var loc = '$kHomePath';
        loc += currentTab == null ? '' : '?';
        loc += encodeKeyValPair(key: kTabParam, value: currentTab?.toString());
        return Uri.encodeFull(loc);
      case kItemPath:
        var loc = '$kItemPath';
        loc += itemId == null ? '' : '?';
        loc += encodeKeyValPair(key: kIdParam, value: itemId);
        return Uri.encodeFull(loc);
        return kHomePath;

PS: I have declared location field as non-nullable String to simplify the logic.

in chapter 2, I can not add image. i am always receiving this error below. please help. thanks.

Could not update files on device: FileSystemException: Cannot open file, path = ‘C:\Users\user\Desktop\flutterDevFolder\recipes\assets\15452035777_294cefced5_c.jpg’ (OS Error: The system cannot find the file specified.
, errno = 2)

@jomoka @mkatz
Ch6: I was following the book example using VSCode. Section 6.9: The highlighted line in the snapshot below did not hold true for me. The squiggles remained in place and did not disappear. link.


Ch7: There is a missing indentation in the following code segment @ 7.11 Navigation. link.


1 Like



Who calls setNewRoutePath() ?

I tried testing deep link in my terminal ,this what am seeing

Am facing this error even after adding Splash screen to the app route (p.g 295) => .The Navigator.pages must not be empty to use the Navigator.pages API.

Book chapter: 7. page 294.

Any help please.

1 Like

Thank you @alilosoft for taking the time to report this. I was previously reported on 5-October.




Chapter 6.

// TODO 22: Add Row to group (name, date, importance)

is missing the Row widget.

thanks @moricio it has already been corrected, we are working on updated the book with the latest feedback!

@drizla yes that is expected. If you follow the rest of the instructions it should prompt you to add a new page as you build up the navigator stack.

Firebase Cloud Firestore

  • Also has a free plan, but charges for storage used, not for queries made, past the limit.
  • Extremely low latency.
  • Easy to store simple data using JSON.
  • Available for mobile only.

And web app ? So we could use it to create flutter web app ?

Chapter 10: Please what does it mean , when they said we should make sure our installed flutter is set to a path that points to it, because i added my installed flutter to the starter folder, the command isn’t running

I forget the section I first noticed this in, but grep all code examples for “TODO;” (TODO followed by semicolon.)

While I suspect colon vs. semicolon doesn’t matter much here - I don’t know if parsers are looking for anything but “TODO” in comments - this was an inconsistency in grammar that popped out at me. You used colon most of the time.

Chapter 12. Under “Handling recipe results”, comment 3 says the Error class is for modelling errors such as incorrect credentials.

  1. Created the Error class to extend Result and hold an exception. This will model errors that occur during an HTTP call, like using the wrong credentials or trying to fetch data without authorization.

However, when the app is run with incorrect credentials, it crashes on line 219 of recipe_list.dart with the following message:

_CastError (type 'Null' is not a subtype of type 'Success<dynamic>' in type cast)

It looks like the Error check isn’t working.

@jomoka @funkyboy i need your help here :sob: :sob:

That output means that the command is running correctly.
The issue is related to the formatting of pubspec.yaml

Entries should be indented like this flta-materials/pubspec.yaml at editions/2.0 · raywenderlich/flta-materials · GitHub