[firebase_database] Why isn't DataSnapshot.value a Map or dynamic in version: ^9.0.0? #7818
-
Before, I would access a value like DataSnapshot.value[key], now I have to do DataSnapshot.child(key).value or assign DataSnapshot.value to a variable and then variable[key]. Please tell me I'm missing something |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
|
Beta Was this translation helpful? Give feedback.
-
Then why doesn't Map a = DataSnapshot.value raise no error? |
Beta Was this translation helpful? Give feedback.
-
@Michael-Eliosov In this case the .value does not return the ordered values |
Beta Was this translation helpful? Give feedback.
@Michael-Eliosov
Now with the new version ^ 9. does the value return an "Object?" that depending on what you return you can treat it in different ways, such as a Map or primitive values (String, int ..)
In this case the .value does not return the ordered values