Null is one of the common errors that we often see in programming. Tony Hoare, a British Computer Scientist who invented this null reference, refers this as the “billion dollar mistake”. This has led to innumerable errors, vulnerabilities, and system crashes, which have probably caused a billion dollars of pains and damages in the last dozen years.

Photo by Polina Zimmerman on Pexels

Dart is not an exception for this error. Although Dart is null safety language, it doesn’t guarantee the variable you have is not null. You can see many thousands of issues caused by nulls in Dart code.

Introduce Null Safety

Before null safety version in Dart…

Stevanus Wijaya

Software Engineer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store