You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm basically working on my app UI presentation and every time I make a change on how a ListView item would look like and hot-reload it, the FHIR fetch fails with NPE.
I've checked and that Map contains the Appointment which is the ResourceType I'm fetching and in fact I'm sure of it because before hot-reload it fetches just fine, moreover if I hot-restart it also fetches just fine.
Anyway, that line: resourceTypeToStringMap[type]! and the logic behind it seems a bit tricky, I mean, there is not need to use a Map for parsing an enum to String, it should be enough just to: type.name and also is not recommended at all to use ! when getting a value from a Map.
The text was updated successfully, but these errors were encountered:
I'm basically working on my app UI presentation and every time I make a change on how a ListView item would look like and hot-reload it, the FHIR fetch fails with NPE.
This is the stacktrace:
Then when I go to the exact class and line that it's pointed (package:fhir/r4/resource/resource.dart:162:36) I've found this:
I've checked and that Map contains the
Appointment
which is the ResourceType I'm fetching and in fact I'm sure of it because before hot-reload it fetches just fine, moreover if I hot-restart it also fetches just fine.Anyway, that line:
resourceTypeToStringMap[type]!
and the logic behind it seems a bit tricky, I mean, there is not need to use a Map for parsing an enum to String, it should be enough just to:type.name
and also is not recommended at all to use ! when getting a value from a Map.The text was updated successfully, but these errors were encountered: