On Xcode 15.2 and Flutter 3.19.5.
A simple error which used to show on VSCode like:
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: type ‘Null’ is not a subtype of type ‘Map<String, dynamic>’ in type cast
Is now showing only on Xcode, but not shown in the Debug console in VSCode.
Any ideas? This is when I started using a physical iOS device, where now Xcode is forced to open and run alongside VSCode (which is something new, even on debug mode).
Note: This is only true for certain debug error messages, some other exceptions print on VSCode just fine, like RenderFlex.
3
Answers
Looks like this is a recent change on iOS 17.
Taken from an answer here:
This is likely why the debugging messages now are split between Xcode and VSCode in an unorganized manner. This will need to be fixed in future Flutter releases for consistency. Someone should open an issue on the repository.
Source: https://stackoverflow.com/a/77514500/14661648
you have a value that remains null.
You must free this from null!
i think this error not from xcode, you need to test app well because this mean there is a data is null value and you and check null operation on it (!) you can make it (?) so you tell that it may be null.