Chapter 7 - Nullability - Source Code is not null safe

Ironicially, the source code for Chapter 7 does not appear to use Dart 2.12.0 or higher, therefore it is not null safe by default, which could confuse folks.

So, if you hit this chapter, and are using the supplementayr materials, double-check your pubspec.yaml to make sure you have sdk: '>=2.12.0 < 3.0.0'

Ironic, indeed! I can’t believe I missed that. I’ll put a high priority on updating the supplementary materials this week. It’s not just Chapter 7. It’s all the chapters. Thank you very much for leaving a comment about this!

Ah, I found the problem! The default branch on the GitHub repo is currently pointing to the editions/1.0 branch. The null safety update uses the editions/1.1 branch. The link to the 1.1 branch is here:

I also opened a GitHub issue to change the default branch to the current one.

I’m glad that it turned out to be an easy fix and that I hadn’t forgotten something so basic as updating the Dart SDK environment version.

1 Like

It has been fixed now. The default branch now points to the null safety version. Thank you again for bringing this up!

1 Like

Thanks for the quick responses and followup!

1 Like