In most languages, when you attempt to use a null pointer, an exception will get thrown. In Flutter however, this doesn't seem to be the case. Instead of throwing an exception, it simply stops executing the function.
void test() {
Map<String, dynamic> testObject = null;
// attempt to call a function on a null pointer
var contains = testObject.containsKey("test");
//will never execute:
print("never prints");
}
This is fine in a production app. But when I'm developing an app, I want to know when my app attempts to access a null pointer.
Is it possible to enable some sort of 'strict' mode in Flutter during development so I can catch these situations during development?