Did you know?

Dart 3.8 introduces null-aware elements!

This allows you to add nullable elements to a collection with a single character (?).

Much shorter than using the collection-if syntax. 👍

Null-aware elements in Dart 3.8

Here are some more examples (from the docs) showing how you might use this:

Null-aware elements (more examples)

More details on the feature specification:

Happy coding!