Home > Software design >  Using Map <> in flutter
Using Map <> in flutter

Time:11-10

[![enter image description here][1]][1]

dears. as we know a Map can have <key, Value> right? then in the picture I see the first element as the key and the second one is the value which is String also. but after we do have another String and also a List as the value. I'm confused about the second part. do we have tow key and value in one Map? please some one Explain it for me. or give me link to study deep an understand with example. much thanks. [1]: https://i.stack.imgur.com/pbeOy.png

CodePudding user response:

If I can understand, your "questions" structure is not a Map but a list, because its items are enclosed by [ ] and not by {}. It is a list of structures. did I wrong ?

CodePudding user response:

It is not Map, it is List including Maps

List<Map<String, dynamic>> questions;
  • Related