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.
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.
Before null safety version in Dart…