Testing for something that might not exist, is spawning risk of a null but what is the option to acknowledge that and assign good results to a non-null variable?
For example [path_provider getExternalStorageDirectory();] might reasonably respond null in the case there is no external storage.
How can a Directory be assigned, if it does exist, with that risk that might null?
Assigning a temporary variable to test for the null, doesn't work.
Error is consistently then
A value of type 'Directory?' can't be assigned to a variable of type 'Directory'.