I am trying to find out what the status of avoiding unchecked access to null with compiler/analyzer support is in Dart.
Having done a couple of years of TypeScript, their strict default-non-null was a huge step forward in making code much safer. I like that even more than the Option-semantics of Scala.
Is there an analyzer option that is able to track down (all) potential null access through flow analysis?
For example, the following code should fail:
void foo(String b) {
print(b.length);
}
void main() {
foo(null);
}
It should report like: Unchecked null access in line 2 due to passing null in line 6.
So as a developer, I can then decide to fix line 1 or 2.